|
|
@@ -241,7 +241,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
//没有合同编号则生成
|
|
|
createContractNo(t);
|
|
|
}else if(!t.getOrderDep().equals(t2.getOrderDep())) {
|
|
|
- contractNoReplace(t.getOrderNo(), t);
|
|
|
+ contractNoReplace(t.getOrderNo(), t2.getContractNo(),t2.getOrderDep());
|
|
|
createContractNo(t);
|
|
|
}
|
|
|
}
|
|
|
@@ -644,7 +644,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
t.getOrderStatus()==OrderNewState.DQD.getCode()||t.getOrderStatus()==OrderNewState.QDSHJJ.getCode()) {
|
|
|
t.setOrderNo(orderNo);
|
|
|
t.setDeleteSign(1);//作废
|
|
|
- contractNoReplace(orderNo, t);
|
|
|
+ contractNoReplace(orderNo, t.getContractNo(),t.getOrderDep());
|
|
|
t.setContractNo("");
|
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
|
@@ -657,16 +657,16 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
* @param orderNo
|
|
|
* @param t
|
|
|
*/
|
|
|
- private void contractNoReplace(String orderNo, TOrderNew t) {
|
|
|
+ private void contractNoReplace(String orderNo, String contractNo,String orderDep) {
|
|
|
Calendar c=Calendar.getInstance();
|
|
|
int y=c.getWeekYear();
|
|
|
String ys="-"+y;
|
|
|
- if (t.getContractNo().contains(ys)) {
|
|
|
+ if (contractNo.contains(ys)) {
|
|
|
IdleContractNo i=new IdleContractNo();
|
|
|
i.setAid(TokenManager.getAdminId());
|
|
|
- i.setContractNo(t.getContractNo());
|
|
|
+ i.setContractNo(contractNo);
|
|
|
i.setUsedOrderNo(orderNo);
|
|
|
- OrganizationManagement o=organizationManagementMapper.selectByPrimaryKey(t.getOrderDep());
|
|
|
+ OrganizationManagement o=organizationManagementMapper.selectByPrimaryKey(orderDep);
|
|
|
i.setAbbreviation(o.getAbbreviation());
|
|
|
idleContractNoMapper.insertSelective(i);
|
|
|
}
|