commit for pull
This commit is contained in:
parent
c588346c69
commit
00c907ece0
@ -33,6 +33,7 @@ spring:
|
||||
enabled: true
|
||||
redis:
|
||||
database: 6
|
||||
#host: 127.0.0.1
|
||||
host: 10.0.1.249
|
||||
#host: 192.168.0.102
|
||||
port: 6379
|
||||
|
@ -160,6 +160,15 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
public String getErrorBoxId(String sapMaterial){
|
||||
|
||||
String nowTime = DateUtil.format(new Date(), "yyMMdd");
|
||||
String mixBoxError = "001";
|
||||
String res = "Err"+sapMaterial+nowTime+mixBoxError;
|
||||
return res;
|
||||
}
|
||||
|
||||
public String removeKG(String str){
|
||||
return str.substring(0,17);
|
||||
}
|
||||
@ -302,9 +311,6 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
}
|
||||
},1,1, TimeUnit.SECONDS);
|
||||
|
||||
|
||||
|
||||
|
||||
kukaStep2.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -351,7 +357,7 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
boxId = getBoxId(bySubId.getSapMaterial());
|
||||
}else {
|
||||
//正常情况
|
||||
boxId = getBoxId(bySubId.getSapMaterial());
|
||||
boxId = getErrorBoxId(bySubId.getSapMaterial());
|
||||
}
|
||||
|
||||
|
||||
@ -367,6 +373,7 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
//4. box信息录入到box表
|
||||
WoPackagingBox woPackagingBox = new WoPackagingBox();
|
||||
woPackagingBox.setBoxNo(boxId);
|
||||
woPackagingBox.setSubstrateQuantity(listSize);
|
||||
woPackagingBox.setPackagingTime(LocalDateTime.now());
|
||||
woPackagingBox.setPowerLevel(bySubId.getPowerLevel());
|
||||
woPackagingBox.setLineBody(bySubId.getLineBody());
|
||||
@ -399,7 +406,6 @@ public class KukaJoinThread implements ApplicationRunner {
|
||||
}
|
||||
},1,1, TimeUnit.SECONDS);
|
||||
|
||||
|
||||
kukaStep3.scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -144,12 +144,12 @@ public class WoPackagingBoxSubstrateController {
|
||||
totalSubNum+= subNum;
|
||||
}
|
||||
for(PowerReportDTO power : powerReportDTOS){
|
||||
Float prop = Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum);
|
||||
Float prop = (Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum))*100;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String propS = df.format(prop)+"%";
|
||||
power.setProportion(propS);
|
||||
}
|
||||
diversePower = totalLevelPower - totalCompensatePower;
|
||||
diversePower = totalCompensatePower - totalLevelPower;
|
||||
powerReportVo.setPowerReports(powerReportDTOS);
|
||||
powerReportVo.setDiversePower(diversePower);
|
||||
powerReportVo.setTotalCompensatePower(totalCompensatePower);
|
||||
|
@ -46,6 +46,11 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
private WoPackagingBoxSubstrateServiceBiz woPackagingBoxSubstrateServiceBiz;
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
LocalDateTime localDate=LocalDateTime.parse("2023-03-23 09:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
System.out.println(localDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryWrapper<WoPackagingBox> getWrapper(Map<String, Object> params){
|
||||
|
||||
@ -55,6 +60,8 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
if(params.get("startTime")!=null && params.get("endTime")!=null){
|
||||
LocalDateTime startTime = LocalDateTime.parse(params.get("startTime").toString(),df);
|
||||
LocalDateTime endTime = LocalDateTime.parse(params.get("endTime").toString(),df);
|
||||
|
||||
|
||||
wrapper.between(startTime!=null && endTime!=null, WoPackagingBox.CREATE_TIME, startTime, endTime);
|
||||
}
|
||||
String boxNo = (String) params.get("boxNo");
|
||||
|
Loading…
Reference in New Issue
Block a user