|
|
@@ -91,12 +91,16 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
prodInOut.setCompanyId(companyId);
|
|
|
prodInOut.setCreatorId(userId);
|
|
|
prodInOut.setCreateTime(new Date());
|
|
|
- prodInOut.setPi_date(new Date());
|
|
|
+ prodInOut.setPi_recordmanid(userId);
|
|
|
+ prodInOut.setPi_recorddate(new Date());
|
|
|
+ prodInOut.setPi_recordman("TESTADMIN");
|
|
|
|
|
|
+ if(prodInOut.getPi_date() == null){
|
|
|
+ prodInOut.setPi_date(new Date());
|
|
|
+ }
|
|
|
//编号获取
|
|
|
pi_inoutno = pushMaxnubmer(prodInOut);
|
|
|
prodInOut.setPi_inoutno(pi_inoutno);
|
|
|
-
|
|
|
prodInOut.setPi_class(main.getPi_class());
|
|
|
prodInOut.setPi_said(main.getPi_said());
|
|
|
prodInOut.setPi_sacode(main.getPi_sacode());
|
|
|
@@ -112,6 +116,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
detail.setPd_piid(pi_id);
|
|
|
detail.setPd_inoutno(pi_inoutno);
|
|
|
detail.setPd_piclass(pi_class);
|
|
|
+ detail.setCompanyId(companyId);
|
|
|
+ detail.setCreateTime(new Date());
|
|
|
detail.setPd_yqty(0.0);
|
|
|
insertDetails.add(detail);
|
|
|
}
|
|
|
@@ -394,10 +400,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
String piInoutno =
|
|
|
//BillCodeSeq.SALEIN.getCaller() + Math.abs(Math.random()*100);
|
|
|
maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
|
|
|
+ //设置公司id
|
|
|
+ targetPi.setCompanyId(sourcePi.getCompanyId());
|
|
|
+ targetPi.setCreateTime(new Date());
|
|
|
+ targetPi.setCreatorId(BaseContextHolder.getUserId());
|
|
|
+ targetPi.setPi_recordmanid(BaseContextHolder.getUserId());
|
|
|
+ targetPi.setPi_recorddate(new Date());
|
|
|
+ targetPi.setPi_recordman("TESTADMIN");
|
|
|
+
|
|
|
targetPi.setPi_inoutno(piInoutno);
|
|
|
targetPi.setPi_class(BillCodeSeq.SALEIN.getName());
|
|
|
targetPi.setPi_date(new Date());
|
|
|
- targetPi.setPi_recorddate(new Date());
|
|
|
targetPi.setPi_status(Status.UNAUDITED.getDisplay());
|
|
|
targetPi.setPi_statuscode(Status.UNAUDITED.name());
|
|
|
//客户信息
|
|
|
@@ -406,9 +419,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
targetPi.setPi_custname(sourcePi.getPi_custname());
|
|
|
targetPi.setPi_said(sourcePi.getPi_said());
|
|
|
targetPi.setPi_sacode(sourcePi.getPi_sacode());
|
|
|
-
|
|
|
- //设置公司id
|
|
|
- targetPi.setCompanyId(sourcePi.getCompanyId());
|
|
|
//保存数据
|
|
|
getMapper().insertSelective(targetPi);
|
|
|
//插入销售退货单从表
|
|
|
@@ -419,6 +429,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
pdOutqty = sourcePid.getPd_outqty()==null?0.0:sourcePid.getPd_outqty();
|
|
|
pdYqty = sourcePid.getPd_yqty()==null?0.0:sourcePid.getPd_yqty();
|
|
|
if(pdOutqty-pdYqty>0){
|
|
|
+ //公司id
|
|
|
+ targetPid.setCompanyId(sourcePid.getCompanyId());
|
|
|
+ targetPid.setCreateTime(new Date());
|
|
|
targetPid.setPd_piid(pi_id);
|
|
|
targetPid.setPd_inoutno(piInoutno);
|
|
|
targetPid.setPd_piclass(BillCodeSeq.SALEIN.getName());
|
|
|
@@ -436,8 +449,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
targetPid.setPd_unit(sourcePid.getPd_unit());
|
|
|
targetPid.setPd_ioid(sourcePid.getId());
|
|
|
targetPid.setPd_status(0);
|
|
|
- //公司id
|
|
|
- targetPid.setCompanyId(sourcePid.getCompanyId());
|
|
|
+
|
|
|
//本次转单数
|
|
|
targetPid.setPd_inqty(pdOutqty-pdYqty);
|
|
|
prodIODetailMapper.insertSelective(targetPid);
|