|
@@ -78,9 +78,71 @@ public class TXlhtMedicineParamServiceImpl implements ITXlhtMedicineParamService
|
|
|
public int insertTXlhtMedicineParam(TXlhtMedicineParam tXlhtMedicineParam)
|
|
|
{
|
|
|
tXlhtMedicineParam.setCreateTime(DateUtils.getNowDate());
|
|
|
+
|
|
|
+ this.addOneForZTAndFront(tXlhtMedicineParam);
|
|
|
return tXlhtMedicineParamMapper.insertTXlhtMedicineParam(tXlhtMedicineParam);
|
|
|
}
|
|
|
|
|
|
+ private void addOneForZTAndFront(TXlhtMedicineParam tXlhtMedicineParam) {
|
|
|
+ Integer typeOne = tXlhtMedicineParam.getTypeOne();
|
|
|
+ if(!Objects.isNull(typeOne)){
|
|
|
+ tXlhtMedicineParam.setTypeOne(typeOne + 1);
|
|
|
+ }
|
|
|
+ Integer typeTwo = tXlhtMedicineParam.getTypeTwo();
|
|
|
+ if(!Objects.isNull(typeTwo)){
|
|
|
+ tXlhtMedicineParam.setTypeTwo(typeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer jsLlTypeOne = tXlhtMedicineParam.getJsLlTypeOne();
|
|
|
+ if(!Objects.isNull(jsLlTypeOne)){
|
|
|
+ tXlhtMedicineParam.setJsLlTypeOne(jsLlTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer jsLlTypeTwo = tXlhtMedicineParam.getJsLlTypeTwo();
|
|
|
+ if(!Objects.isNull(jsLlTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setJsLlTypeTwo(jsLlTypeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer jsCodTypeOne = tXlhtMedicineParam.getJsCodTypeOne();
|
|
|
+ if(!Objects.isNull(jsCodTypeOne)){
|
|
|
+ tXlhtMedicineParam.setJsCodTypeOne(jsCodTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer jsCodTypeTwo = tXlhtMedicineParam.getJsCodTypeTwo();
|
|
|
+ if(!Objects.isNull(jsCodTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setJsCodTypeTwo(jsCodTypeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer hycXsyTypeOne = tXlhtMedicineParam.getHycXsyTypeOne();
|
|
|
+ if(!Objects.isNull(hycXsyTypeOne)){
|
|
|
+ tXlhtMedicineParam.setHycXsyTypeOne(hycXsyTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer hycXsyTypeTwo = tXlhtMedicineParam.getHycXsyTypeTwo();
|
|
|
+ if(!Objects.isNull(hycXsyTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setHycXsyTypeTwo(hycXsyTypeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer qycYxyTypeOne = tXlhtMedicineParam.getQycYxyTypeOne();
|
|
|
+ if(!Objects.isNull(qycYxyTypeOne)){
|
|
|
+ tXlhtMedicineParam.setQycYxyTypeOne(qycYxyTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer qycYxyTypeTwo = tXlhtMedicineParam.getQycYxyTypeTwo();
|
|
|
+ if(!Objects.isNull(qycYxyTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setQycYxyTypeTwo(qycYxyTypeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer qycAdTypeOne = tXlhtMedicineParam.getQycAdTypeOne();
|
|
|
+ if(!Objects.isNull(qycAdTypeOne)){
|
|
|
+ tXlhtMedicineParam.setQycAdTypeOne(qycAdTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer qycAdTypeTwo = tXlhtMedicineParam.getQycAdTypeTwo();
|
|
|
+ if(!Objects.isNull(qycAdTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setQycAdTypeTwo(qycAdTypeTwo + 1);
|
|
|
+ }
|
|
|
+ Integer jsTnTypeOne = tXlhtMedicineParam.getJsTnTypeOne();
|
|
|
+ if(!Objects.isNull(jsTnTypeOne)){
|
|
|
+ tXlhtMedicineParam.setJsTnTypeOne(jsTnTypeOne + 1);
|
|
|
+ }
|
|
|
+ Integer jsTnTypeTwo = tXlhtMedicineParam.getJsTnTypeTwo();
|
|
|
+ if(!Objects.isNull(jsTnTypeTwo)){
|
|
|
+ tXlhtMedicineParam.setJsTnTypeTwo(jsTnTypeTwo + 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* 修改智能投药参数设置
|
|
|
*
|
|
@@ -131,6 +193,8 @@ public class TXlhtMedicineParamServiceImpl implements ITXlhtMedicineParamService
|
|
|
|
|
|
|
|
|
SmartAdd smartAdd = this.shuju1Mapper.getNewestData();
|
|
|
+
|
|
|
+ this.parseData(latestRecord);
|
|
|
if(!Objects.isNull(smartAdd)){
|
|
|
|
|
|
|
|
@@ -226,6 +290,66 @@ public class TXlhtMedicineParamServiceImpl implements ITXlhtMedicineParamService
|
|
|
latestRecord.setTytjTransientLLOne(tTbDu.getC1TjLl());
|
|
|
latestRecord.setTytjTransientLLTwo(tTbDu.getC2TjLl());
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void parseData(TXlhtMedicineParam latestRecord) {
|
|
|
+ Integer typeOne = latestRecord.getTypeOne();
|
|
|
+ if(!Objects.isNull(typeOne)){
|
|
|
+ latestRecord.setTypeOne(typeOne - 1);
|
|
|
+ }
|
|
|
+ Integer typeTwo = latestRecord.getTypeTwo();
|
|
|
+ if(!Objects.isNull(typeTwo)){
|
|
|
+ latestRecord.setTypeTwo(typeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer jsLlTypeOne = latestRecord.getJsLlTypeOne();
|
|
|
+ if(!Objects.isNull(jsLlTypeOne)){
|
|
|
+ latestRecord.setJsLlTypeOne(jsLlTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer jsLlTypeTwo = latestRecord.getJsLlTypeTwo();
|
|
|
+ if(!Objects.isNull(jsLlTypeTwo)){
|
|
|
+ latestRecord.setJsLlTypeTwo(jsLlTypeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer jsCodTypeOne = latestRecord.getJsCodTypeOne();
|
|
|
+ if(!Objects.isNull(jsCodTypeOne)){
|
|
|
+ latestRecord.setJsCodTypeOne(jsCodTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer jsCodTypeTwo = latestRecord.getJsCodTypeTwo();
|
|
|
+ if(!Objects.isNull(jsCodTypeTwo)){
|
|
|
+ latestRecord.setJsCodTypeTwo(jsCodTypeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer hycXsyTypeOne = latestRecord.getHycXsyTypeOne();
|
|
|
+ if(!Objects.isNull(hycXsyTypeOne)){
|
|
|
+ latestRecord.setHycXsyTypeOne(hycXsyTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer hycXsyTypeTwo = latestRecord.getHycXsyTypeTwo();
|
|
|
+ if(!Objects.isNull(hycXsyTypeTwo)){
|
|
|
+ latestRecord.setHycXsyTypeTwo(hycXsyTypeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer qycYxyTypeOne = latestRecord.getQycYxyTypeOne();
|
|
|
+ if(!Objects.isNull(qycYxyTypeOne)){
|
|
|
+ latestRecord.setQycYxyTypeOne(qycYxyTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer qycYxyTypeTwo = latestRecord.getQycYxyTypeTwo();
|
|
|
+ if(!Objects.isNull(qycYxyTypeTwo)){
|
|
|
+ latestRecord.setQycYxyTypeTwo(qycYxyTypeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer qycAdTypeOne = latestRecord.getQycAdTypeOne();
|
|
|
+ if(!Objects.isNull(qycAdTypeOne)){
|
|
|
+ latestRecord.setQycAdTypeOne(qycAdTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer qycAdTypeTwo = latestRecord.getQycAdTypeTwo();
|
|
|
+ if(!Objects.isNull(qycAdTypeTwo)){
|
|
|
+ latestRecord.setQycAdTypeTwo(qycAdTypeTwo - 1);
|
|
|
+ }
|
|
|
+ Integer jsTnTypeOne = latestRecord.getJsTnTypeOne();
|
|
|
+ if(!Objects.isNull(jsTnTypeOne)){
|
|
|
+ latestRecord.setJsTnTypeOne(jsTnTypeOne - 1);
|
|
|
+ }
|
|
|
+ Integer jsTnTypeTwo = latestRecord.getJsTnTypeTwo();
|
|
|
+ if(!Objects.isNull(jsTnTypeTwo)){
|
|
|
+ latestRecord.setJsTnTypeTwo(jsTnTypeTwo - 1);
|
|
|
}
|
|
|
}
|
|
|
}
|