فهرست منبع

自定义工单 请求大模型的数据小数改为两位小数 增加长度的限制

wangmiaomiao 9 ماه پیش
والد
کامیت
aa500c5eee
1فایلهای تغییر یافته به همراه31 افزوده شده و 31 حذف شده
  1. 31 31
      slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

+ 31 - 31
slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

@@ -358,73 +358,73 @@ public class FrontServiceImpl implements IFrontService {
 
     private void buildIndustryData(TXinyiIndustry industry, WorkOrderRes workOrderRes, WorkOrderReq workOrderReq) {
         if(workOrderReq.getJsSlq())
-            workOrderRes.setJsSlq(DecimalUtils.getAbsAndScale(industry.getJsSlq(), 3));
+            workOrderRes.setJsSlq(DecimalUtils.getAbsAndScale(industry.getJsSlq(), 2));
         if(workOrderReq.getJsCod())
-            workOrderRes.setJsCod(DecimalUtils.getAbsAndScale(industry.getJsCod(), 3));
+            workOrderRes.setJsCod(DecimalUtils.getAbsAndScale(industry.getJsCod(), 2));
         if(workOrderReq.getJsTn())
-            workOrderRes.setJsTn(DecimalUtils.getAbsAndScale(industry.getJsTn(), 3));
+            workOrderRes.setJsTn(DecimalUtils.getAbsAndScale(industry.getJsTn(), 2));
         if(workOrderReq.getJsTp())
-            workOrderRes.setJsTp(DecimalUtils.getAbsAndScale(industry.getJsTp(), 3));
+            workOrderRes.setJsTp(DecimalUtils.getAbsAndScale(industry.getJsTp(), 2));
         if(workOrderReq.getJsNh3())
-            workOrderRes.setJsNh3(DecimalUtils.getAbsAndScale(industry.getJsNh3(), 3));
+            workOrderRes.setJsNh3(DecimalUtils.getAbsAndScale(industry.getJsNh3(), 2));
         if(workOrderReq.getJsSs())
-            workOrderRes.setJsSs(DecimalUtils.getAbsAndScale(industry.getJsSs(), 3));
+            workOrderRes.setJsSs(DecimalUtils.getAbsAndScale(industry.getJsSs(), 2));
         if(workOrderReq.getCsSlqc())
-            workOrderRes.setCsSlqc(DecimalUtils.getAbsAndScale(industry.getCsSlqc(), 3));
+            workOrderRes.setCsSlqc(DecimalUtils.getAbsAndScale(industry.getCsSlqc(), 2));
         if(workOrderReq.getCsCod())
-            workOrderRes.setCsCod(DecimalUtils.getAbsAndScale(industry.getCsCod(), 3));
+            workOrderRes.setCsCod(DecimalUtils.getAbsAndScale(industry.getCsCod(), 2));
         if(workOrderReq.getCsTn())
-            workOrderRes.setCsTn(DecimalUtils.getAbsAndScale(industry.getCsTn(), 3));
+            workOrderRes.setCsTn(DecimalUtils.getAbsAndScale(industry.getCsTn(), 2));
         if(workOrderReq.getCsTp())
-            workOrderRes.setCsTp(DecimalUtils.getAbsAndScale(industry.getCsTp(), 3));
+            workOrderRes.setCsTp(DecimalUtils.getAbsAndScale(industry.getCsTp(), 2));
         if(workOrderReq.getCsNh3())
-            workOrderRes.setCsNh3(DecimalUtils.getAbsAndScale(industry.getCsNh3(), 3));
+            workOrderRes.setCsNh3(DecimalUtils.getAbsAndScale(industry.getCsNh3(), 2));
         if(workOrderReq.getCsSs())
-            workOrderRes.setCsSs(DecimalUtils.getAbsAndScale(industry.getCsSs(), 3));
+            workOrderRes.setCsSs(DecimalUtils.getAbsAndScale(industry.getCsSs(), 2));
     }
 
     private void buildDailyData(TXinyiDaily tXinyiDaily, WorkOrderRes workOrderRes, WorkOrderReq workOrderReq) {
         if(workOrderReq.getJsSlq())
-            workOrderRes.setJsSlq(DecimalUtils.getAbsAndScale(tXinyiDaily.getJSL(), 3));
+            workOrderRes.setJsSlq(DecimalUtils.getAbsAndScale(tXinyiDaily.getJSL(), 2));
         if(workOrderReq.getJsCod())
-            workOrderRes.setJsCod(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsCod(), 3));
+            workOrderRes.setJsCod(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsCod(), 2));
         if(workOrderReq.getJsTn())
-            workOrderRes.setJsTn(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsTn(), 3));
+            workOrderRes.setJsTn(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsTn(), 2));
         if(workOrderReq.getJsTp())
-            workOrderRes.setJsTp(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsTp(), 3));
+            workOrderRes.setJsTp(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsTp(), 2));
         if(workOrderReq.getJsNh3())
-            workOrderRes.setJsNh3(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsNh3(), 3));
+            workOrderRes.setJsNh3(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsNh3(), 2));
         if(workOrderReq.getJsSs())
-            workOrderRes.setJsSs(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsSs(), 3));
+            workOrderRes.setJsSs(DecimalUtils.getAbsAndScale(tXinyiDaily.getJsSs(), 2));
         if(workOrderReq.getCsSlqc())
-            workOrderRes.setCsSlqc(DecimalUtils.getAbsAndScale(tXinyiDaily.getCSL(), 3));
+            workOrderRes.setCsSlqc(DecimalUtils.getAbsAndScale(tXinyiDaily.getCSL(), 2));
         if(workOrderReq.getCsCod())
-            workOrderRes.setCsCod(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsCod(), 3));
+            workOrderRes.setCsCod(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsCod(), 2));
         if(workOrderReq.getCsTn())
-            workOrderRes.setCsTn(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsTn(), 3));
+            workOrderRes.setCsTn(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsTn(), 2));
         if(workOrderReq.getCsTp())
-            workOrderRes.setCsTp(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsTp(), 3));
+            workOrderRes.setCsTp(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsTp(), 2));
         if(workOrderReq.getCsNh3())
-            workOrderRes.setCsNh3(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsNh3(), 3));
+            workOrderRes.setCsNh3(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsNh3(), 2));
         if(workOrderReq.getCsSs())
-            workOrderRes.setCsSs(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsSs(), 3));
+            workOrderRes.setCsSs(DecimalUtils.getAbsAndScale(tXinyiDaily.getCsSs(), 2));
     }
 
     private void buildRobotData(TXinyiRobot xinyiRobot, WorkOrderRes workOrderRes, WorkOrderReq workOrderReq) {
         if(workOrderReq.getNo3Hlj1Jqr())
-            workOrderRes.setNo3Hlj1Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Hlj1Jqr(), 3));
+            workOrderRes.setNo3Hlj1Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Hlj1Jqr(), 2));
         if(workOrderReq.getNo3Hlj2Jqr())
-            workOrderRes.setNo3Hlj2Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Hlj2Jqr(), 3));
+            workOrderRes.setNo3Hlj2Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Hlj2Jqr(), 2));
         if(workOrderReq.getNh31Jqr())
-            workOrderRes.setNh31Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNh31Jqr(), 3));
+            workOrderRes.setNh31Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNh31Jqr(), 2));
         if(workOrderReq.getNh32Jqr())
-            workOrderRes.setNh32Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNh32Jqr(), 3));
+            workOrderRes.setNh32Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNh32Jqr(), 2));
         if(workOrderReq.getNo3Qyc1Jqr())
-            workOrderRes.setNo3Qyc1Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Qyc1Jqr(), 3));
+            workOrderRes.setNo3Qyc1Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Qyc1Jqr(), 2));
         if(workOrderReq.getNo3Qyc2Jqr())
-            workOrderRes.setNo3Qyc2Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Qyc2Jqr(), 3));
+            workOrderRes.setNo3Qyc2Jqr(DecimalUtils.getAbsAndScale(xinyiRobot.getNo3Qyc2Jqr(), 2));
         if(workOrderReq.getTpRccJqr())
-            workOrderRes.setTpRccJqr(DecimalUtils.getAbsAndScale(xinyiRobot.getTpRccJqr(), 3));
+            workOrderRes.setTpRccJqr(DecimalUtils.getAbsAndScale(xinyiRobot.getTpRccJqr(), 2));
     }
 
     private void checkCustomWorkOrder(WorkOrderReq workOrderReq) {