|
@@ -121,12 +121,13 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
|
121
|
121
|
BusinessRpInboundExample businessRpInboundExample =new BusinessRpInboundExample();
|
122
|
122
|
businessRpReport.setUpdateTime(new Date());
|
123
|
123
|
if(businessRpReport.getStatus()==0){
|
124
|
|
- if(businessRpReport.getId()!=null){//修改
|
|
124
|
+ if(businessRpReport.getId()!=null){
|
125
|
125
|
businessRpReportMapper.updateByPrimaryKeySelective(businessRpReport);
|
126
|
126
|
businessRpInboundMapper.deleteByReportId(businessRpReport.getId());
|
127
|
127
|
businessRpOutboundMapper.deleteByReportId(businessRpReport.getId());
|
128
|
128
|
List<BusinessRpInbound> inList =businessRpReport.getBusinessRpInboundList();
|
129
|
129
|
for (BusinessRpInbound br: inList) {
|
|
130
|
+
|
130
|
131
|
br.setCreatedate(new Date());
|
131
|
132
|
br.setUpdatedate(new Date());
|
132
|
133
|
br.setRpReportId(businessRpReport.getId());
|
|
@@ -139,7 +140,7 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
|
139
|
140
|
ou.setRpReportId(businessRpReport.getId());
|
140
|
141
|
businessRpOutboundMapper.insertSelective(ou);
|
141
|
142
|
}
|
142
|
|
- }else{//保存
|
|
143
|
+ }else{
|
143
|
144
|
businessRpReport.setCreateTime(new Date());
|
144
|
145
|
businessRpReport.setUpdateTime(new Date());
|
145
|
146
|
businessRpReportMapper.insert(businessRpReport);
|
|
@@ -148,7 +149,7 @@ public class BusinessRpReportServiceImpl implements BusinessRpReportService {
|
148
|
149
|
br.setCreatedate(new Date());
|
149
|
150
|
br.setUpdatedate(new Date());
|
150
|
151
|
br.setRpReportId(businessRpReport.getId());
|
151
|
|
- businessRpInboundMapper.insertSelective1(br);
|
|
152
|
+ businessRpInboundMapper.insertSelective(br);
|
152
|
153
|
}
|
153
|
154
|
List<BusinessRpOutbound> outlist =businessRpReport.getBusinessRpOutboundList();
|
154
|
155
|
for (BusinessRpOutbound ou: outlist) {
|