膜布添加异常处理

master
382696293@qq.com 2 years ago
parent 3c28595a54
commit 6e0c8e6592

@ -284,22 +284,13 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
wxInstrumentMode.setInstrumentId(wxInstrument.getId()); wxInstrumentMode.setInstrumentId(wxInstrument.getId());
wxInstrumentMode.setModeId(modeList.get(i).longValue()); wxInstrumentMode.setModeId(modeList.get(i).longValue());
wxInstrumentMode.setModeSort(i); wxInstrumentMode.setModeSort(i);
wxInstrumentMode.setIsNew(0); if (wxLining.getNewModeIdList() != null && wxLining.getNewModeIdList().size() > 0) {
wxInstrumentMode.setLiningId(liningId); if (wxLining.getNewModeIdList().contains(modeList.get(i))) {
wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setIsNew(1);
wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); }
wxInstrumentMode.setCreateTime(DateUtils.getNowDate()); }else {
wxInstrumentModeMapper.insertWxInstrumentMode(wxInstrumentMode); wxInstrumentMode.setIsNew(0);
} }
}
List<Integer> newModeIdList = wxLining.getNewModeIdList();
if (newModeIdList != null && newModeIdList.size() > 0) {
for (int i = 0; i < newModeIdList.size(); i++) {
WxInstrumentMode wxInstrumentMode = new WxInstrumentMode();
wxInstrumentMode.setInstrumentId(wxInstrument.getId());
wxInstrumentMode.setModeId(modeIdList.get(i).longValue());
wxInstrumentMode.setModeSort(i);
wxInstrumentMode.setIsNew(1);
wxInstrumentMode.setLiningId(liningId); wxInstrumentMode.setLiningId(liningId);
wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setStatus(Status.OK.getCode());
wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); wxInstrumentMode.setCreateBy(SecurityUtils.getUsername());
@ -439,22 +430,13 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
wxInstrumentMode.setInstrumentId(wxInstrument.getId()); wxInstrumentMode.setInstrumentId(wxInstrument.getId());
wxInstrumentMode.setModeId(modeList.get(i).longValue()); wxInstrumentMode.setModeId(modeList.get(i).longValue());
wxInstrumentMode.setModeSort(i); wxInstrumentMode.setModeSort(i);
wxInstrumentMode.setIsNew(0); if (wxLining.getNewModeIdList() != null && wxLining.getNewModeIdList().size() > 0) {
wxInstrumentMode.setLiningId(liningId); if (wxLining.getNewModeIdList().contains(modeList.get(i))) {
wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setIsNew(1);
wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); }
wxInstrumentMode.setCreateTime(DateUtils.getNowDate()); }else {
wxInstrumentModeMapper.insertWxInstrumentMode(wxInstrumentMode); wxInstrumentMode.setIsNew(0);
} }
}
List<Integer> newModeIdList = wxLining.getNewModeIdList();
if (newModeIdList != null && newModeIdList.size() > 0) {
for (int i = 0; i < newModeIdList.size(); i++) {
WxInstrumentMode wxInstrumentMode = new WxInstrumentMode();
wxInstrumentMode.setInstrumentId(wxInstrument.getId());
wxInstrumentMode.setModeId(newModeIdList.get(i).longValue());
wxInstrumentMode.setModeSort(i);
wxInstrumentMode.setIsNew(1);
wxInstrumentMode.setLiningId(liningId); wxInstrumentMode.setLiningId(liningId);
wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setStatus(Status.OK.getCode());
wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); wxInstrumentMode.setCreateBy(SecurityUtils.getUsername());

Loading…
Cancel
Save