Browse Source

[fix] 委外加工

修改委外领料的后端新增接口
dev
liuxiaoxu 4 months ago
parent
commit
e11484bc3b
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/OutsourceRequisitionServiceImpl.java

13
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/OutsourceRequisitionServiceImpl.java

@ -1,7 +1,10 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.OutsourceRequisition;
import com.ruoyi.system.domain.OutsourceRequisitionDetail;
import com.ruoyi.system.mapper.OutsourceRequisitionMapper;
@ -26,6 +29,9 @@ public class OutsourceRequisitionServiceImpl implements IOutsourceRequisitionSer
@Autowired
private OutsourceRequisitionMapper outsourceRequisitionMapper;
@Autowired
private RedisCache redisCache;
/**
* 查询委外领料
*
@ -60,11 +66,14 @@ public class OutsourceRequisitionServiceImpl implements IOutsourceRequisitionSer
@Override
public int insertOutsourceRequisition(OutsourceRequisition outsourceRequisition)
{
String loginName = ShiroUtils.getLoginName();
outsourceRequisition.setCreateBy(loginName);
outsourceRequisition.setCreateTime(DateUtils.getNowDate());
outsourceRequisition.setAuditStatus("0");
outsourceRequisition.setRequisitionStatus("0");
outsourceRequisition.setOutsourceRequisitionNo("WWLL20231103003");
outsourceRequisition.setRequisitionPerson("张三");
String outsourceRequisitionNo = redisCache.generateBillNo("WWLL");
outsourceRequisition.setRequisitionPerson(loginName);
outsourceRequisition.setOutsourceRequisitionNo(outsourceRequisitionNo);
int rows = outsourceRequisitionMapper.insertOutsourceRequisition(outsourceRequisition);
insertOutsourceRequisitionDetail(outsourceRequisition);
return rows;

Loading…
Cancel
Save