|
|
|
@ -55,15 +55,19 @@ import org.springblade.wms.pojo.entity.SyDockingLog; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
|
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
|
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
import org.springframework.http.MediaType; |
|
|
|
import org.springframework.http.MediaType; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* [生产处置单] 服务实现类 |
|
|
|
* [生产处置单] 服务实现类 |
|
|
|
* |
|
|
|
* |
|
|
|
@ -484,7 +488,7 @@ public class ReviewSheetServiceImpl extends EnBaseServiceImpl<ReviewSheetMapper, |
|
|
|
|
|
|
|
|
|
|
|
List<ReviewFault> listF = null; |
|
|
|
List<ReviewFault> listF = null; |
|
|
|
|
|
|
|
|
|
|
|
if(null != vo.getFaultList() && vo.getFaultList().size() > 0){ |
|
|
|
if (null != vo.getFaultList() && !vo.getFaultList().isEmpty()) { |
|
|
|
// 关联rsId
|
|
|
|
// 关联rsId
|
|
|
|
for (ReviewFaultVO voF : vo.getFaultList()) { |
|
|
|
for (ReviewFaultVO voF : vo.getFaultList()) { |
|
|
|
voF.setReviewSheetId(vo.getId()); |
|
|
|
voF.setReviewSheetId(vo.getId()); |
|
|
|
@ -494,16 +498,13 @@ public class ReviewSheetServiceImpl extends EnBaseServiceImpl<ReviewSheetMapper, |
|
|
|
faultService.saveOrUpdateBatch(listF); |
|
|
|
faultService.saveOrUpdateBatch(listF); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
if (StringUtils.isNotBlank(vo.getDutyDeleteIds())) { |
|
|
|
if (StringUtils.isNotBlank(vo.getDutyDeleteIds())) { |
|
|
|
dutyService.deleteLogic(Func.toLongList(vo.getDutyDeleteIds())); |
|
|
|
dutyService.deleteLogic(Func.toLongList(vo.getDutyDeleteIds())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ReviewDuty> listD = null; |
|
|
|
List<ReviewDuty> listD = null; |
|
|
|
if(null != vo.getDutyList() && vo.getDutyList().size() > 0){ |
|
|
|
if (null != vo.getDutyList() && !vo.getDutyList().isEmpty()) { |
|
|
|
// 关联rsId
|
|
|
|
// 关联rsId
|
|
|
|
for (ReviewDutyVO voD : vo.getDutyList()) { |
|
|
|
for (ReviewDutyVO voD : vo.getDutyList()) { |
|
|
|
voD.setReviewSheetId(vo.getId()); |
|
|
|
voD.setReviewSheetId(vo.getId()); |
|
|
|
@ -513,7 +514,6 @@ public class ReviewSheetServiceImpl extends EnBaseServiceImpl<ReviewSheetMapper, |
|
|
|
dutyService.saveOrUpdateBatch(listD); |
|
|
|
dutyService.saveOrUpdateBatch(listD); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 审理单
|
|
|
|
// 审理单
|
|
|
|
ReviewSheet rs = getById(vo.getId()); // 从数据库中查到
|
|
|
|
ReviewSheet rs = getById(vo.getId()); // 从数据库中查到
|
|
|
|
log.info("ReviewSheet rs = {}", rs); |
|
|
|
log.info("ReviewSheet rs = {}", rs); |
|
|
|
@ -525,10 +525,7 @@ public class ReviewSheetServiceImpl extends EnBaseServiceImpl<ReviewSheetMapper, |
|
|
|
Integer bizType = vo.getBizType(); |
|
|
|
Integer bizType = vo.getBizType(); |
|
|
|
// biz类型
|
|
|
|
// biz类型
|
|
|
|
rs.setBizType(bizType); |
|
|
|
rs.setBizType(bizType); |
|
|
|
if ( |
|
|
|
if (ReviewSheetConst.BizType.T_SELF_REDO.equals(rs.getBizType()) || ReviewSheetConst.BizType.T_SELF_SCRAP.equals(rs.getBizType())) { |
|
|
|
ReviewSheetConst.BizType.T_SELF_REDO.equals(rs.getBizType()) || |
|
|
|
|
|
|
|
ReviewSheetConst.BizType.T_SELF_SCRAP.equals(rs.getBizType()) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
if (ReviewSheetConst.SUBMIT_TYPE.T_SELF.equals(submitType)) { // 内部提交
|
|
|
|
if (ReviewSheetConst.SUBMIT_TYPE.T_SELF.equals(submitType)) { // 内部提交
|
|
|
|
// 当前状态
|
|
|
|
// 当前状态
|
|
|
|
rs.setStatus(ReviewSheetConst.STATUS.S_JUDGE); |
|
|
|
rs.setStatus(ReviewSheetConst.STATUS.S_JUDGE); |
|
|
|
@ -603,29 +600,24 @@ public class ReviewSheetServiceImpl extends EnBaseServiceImpl<ReviewSheetMapper, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
|
|
|
obj.put("qmsRepairApplyDTO", dto); |
|
|
|
|
|
|
|
obj.put("qmsRepairPartList", vods); |
|
|
|
|
|
|
|
obj.put("qmsRepairMalfList", vofs); |
|
|
|
|
|
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(obj, headers); |
|
|
|
|
|
|
|
ResponseEntity<JSONObject> responseEntity; |
|
|
|
|
|
|
|
JSONObject responseBody; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
responseEntity = httpClientTemplate.postForEntity(newErpUrl + "/api/mms/qms/qmsrepairapply/qmsRepairApplyRest/saveQmsRepairApply/v1", entity, JSONObject.class); |
|
|
|
|
|
|
|
JSONObject result = responseEntity.getBody(); |
|
|
|
|
|
|
|
|
|
|
|
// JSONObject obj = new JSONObject();
|
|
|
|
responseBody = result.getJSONObject("responseBody"); |
|
|
|
// obj.put("qmsRepairApplyDTO", dto);
|
|
|
|
if (responseBody == null) { |
|
|
|
// obj.put("qmsRepairPartList", vods);
|
|
|
|
throw new ServiceException("审理单,接口返回值null"); |
|
|
|
// obj.put("qmsRepairMalfList", vofs);
|
|
|
|
} |
|
|
|
// HttpEntity<JSONObject> entity = new HttpEntity<>(obj, headers);
|
|
|
|
} catch (Exception e) { |
|
|
|
// ResponseEntity<JSONObject> responseEntity;
|
|
|
|
throw new ServiceException("审理单,接口返回值null"); |
|
|
|
// JSONObject responseBody;
|
|
|
|
} |
|
|
|
// try {
|
|
|
|
|
|
|
|
//// responseEntity = httpClientTemplate.postForEntity("http://192.168.119.68:10113" +
|
|
|
|
|
|
|
|
//// "/api/mms/qms/qmsrepairapply/qmsRepairApplyRest/saveQmsRepairApply/v1", entity, JSONObject.class);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// responseEntity = httpClientTemplate.postForEntity(newErpUrl +
|
|
|
|
|
|
|
|
// "/api/mms/qms/qmsrepairapply/qmsRepairApplyRest/saveQmsRepairApply/v1", entity, JSONObject.class);
|
|
|
|
|
|
|
|
// JSONObject result = responseEntity.getBody();
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// responseBody = result.getJSONObject("responseBody");
|
|
|
|
|
|
|
|
// if (responseBody == null) {
|
|
|
|
|
|
|
|
// throw new BusinessException("审理单,接口返回值null");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
|
|
|
// throw new RuntimeException("审理单,接口返回值null");
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return R.success("成功"); |
|
|
|
return R.success("成功"); |
|
|
|
} |
|
|
|
} |
|
|
|
|