no message

main
奥德彪本彪\92525 2024-08-26 19:48:02 +08:00
parent 5038f678ae
commit fa8ba6f204
16 changed files with 52 additions and 48 deletions

View File

@ -14,25 +14,25 @@ public class CodeForYmYtil {
new Thread(()->{ new Thread(()->{
CodeForYmYtil codeForYmYtil=new CodeForYmYtil(); CodeForYmYtil codeForYmYtil=new CodeForYmYtil();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
String code = codeForYmYtil.CodeForYmYtil("ce",5); String code = CodeForYmYtil("ce",5);
} }
}).start(); }).start();
new Thread(()->{ new Thread(()->{
CodeForYmYtil codeForYmYtil=new CodeForYmYtil(); CodeForYmYtil codeForYmYtil=new CodeForYmYtil();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
String code = codeForYmYtil.CodeForYmYtil("ce",5); String code = CodeForYmYtil("ce",5);
} }
}).start(); }).start();
new Thread(()->{ new Thread(()->{
CodeForYmYtil codeForYmYtil=new CodeForYmYtil(); CodeForYmYtil codeForYmYtil=new CodeForYmYtil();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
String code = codeForYmYtil.CodeForYmYtil("ce",5); String code = CodeForYmYtil("ce",5);
} }
}).start(); }).start();
new Thread(()->{ new Thread(()->{
CodeForYmYtil codeForYmYtil=new CodeForYmYtil(); CodeForYmYtil codeForYmYtil=new CodeForYmYtil();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
String code = codeForYmYtil.CodeForYmYtil("ce",5); String code = CodeForYmYtil("ce",5);
} }
}).start(); }).start();
} }
@ -53,7 +53,7 @@ public class CodeForYmYtil {
String value; String value;
// value = ops.get(key).toString(); // value = ops.get(key).toString();
if (ops.get(key)==null||ops.get(key).equals("")){ if (ops.get(key)==null|| "".equals(ops.get(key))){
ops.set(key, "0"); ops.set(key, "0");
} }
value = (Integer.valueOf(ops.get(key).toString())+1)+""; value = (Integer.valueOf(ops.get(key).toString())+1)+"";

View File

@ -136,16 +136,16 @@ public class DateUtil {
public static String formatChageDay(Date date, String type, int value) { public static String formatChageDay(Date date, String type, int value) {
Calendar cal = new java.util.GregorianCalendar(); Calendar cal = new java.util.GregorianCalendar();
cal.setTime(date); cal.setTime(date);
if (type.equals("DAY")) { if ("DAY".equals(type)) {
cal.add(Calendar.DATE , value); cal.add(Calendar.DATE , value);
} }
if (type.equals("HOUR")) { if ("HOUR".equals(type)) {
cal.add(Calendar.HOUR, value); cal.add(Calendar.HOUR, value);
} }
if (type.equals("MINUTE")) { if ("MINUTE".equals(type)) {
cal.add(Calendar.MINUTE, value); cal.add(Calendar.MINUTE, value);
} }
if (type.equals("SECOND")) { if ("SECOND".equals(type)) {
cal.add(Calendar.SECOND, value); cal.add(Calendar.SECOND, value);
} }
return ymd.format(cal.getTime()); return ymd.format(cal.getTime());

View File

@ -103,7 +103,7 @@ public class LogServiceImpl implements LogService {
log_data.setUsername(username); log_data.setUsername(username);
log_data.setParams(getParameter(method, joinPoint.getArgs())); log_data.setParams(getParameter(method, joinPoint.getArgs()));
// 记录登录用户,隐藏密码信息 // 记录登录用户,隐藏密码信息
if(signature.getName().equals("login") && StringUtils.isNotEmpty(log_data.getParams())){ if("login".equals(signature.getName()) && StringUtils.isNotEmpty(log_data.getParams())){
JSONObject obj = JSONUtil.parseObj(log_data.getParams()); JSONObject obj = JSONUtil.parseObj(log_data.getParams());
log_data.setUsername(obj.getStr("username", "")); log_data.setUsername(obj.getStr("username", ""));
log_data.setParams(JSONUtil.toJsonStr(Dict.create().set("username", log_data.getUsername()))); log_data.setParams(JSONUtil.toJsonStr(Dict.create().set("username", log_data.getUsername())));

View File

@ -170,7 +170,7 @@ public class ServerListenerHandler extends SimpleChannelInboundHandler<String> {
bean1.updateBoxLampStatus(ip,ButtonCode,"1"); bean1.updateBoxLampStatus(ip,ButtonCode,"1");
//处理业务 //处理业务
String boxCode=lampLog.getButtonBox(); String boxCode=lampLog.getButtonBox();
if(boxCode!=null&&!boxCode.equals("")) { if(boxCode!=null&&!"".equals(boxCode)) {
this.buttonService(boxCode);//按钮3的业务处理 this.buttonService(boxCode);//按钮3的业务处理
} }
save.setReturnContent((String) redisUtils.get(String.valueOf(save.getId()))); save.setReturnContent((String) redisUtils.get(String.valueOf(save.getId())));

View File

@ -18,7 +18,7 @@ public class FullStockIn {
String stockCode; String stockCode;
@ApiModelProperty(value = "按钮盒") @ApiModelProperty(value = "按钮盒")
Long boxId=0l; Long boxId=0L;
@ApiModelProperty(value = "作业场景") @ApiModelProperty(value = "作业场景")
String agvScene; String agvScene;

View File

@ -20,6 +20,9 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
/**
* @author 92525
*/
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "美的大屏数据显示") @Api(tags = "美的大屏数据显示")
@ -62,19 +65,19 @@ public class ScreenMdController {
Object barCode=obj[4]; Object barCode=obj[4];
Object lot=obj[5]; Object lot=obj[5];
Object disabled=obj[6]; Object disabled=obj[6];
String inv_status=obj[7]==null?"":obj[7].toString(); String invStatus =obj[7]==null?"":obj[7].toString();
Object loc_status=obj[8]; Object locStatus =obj[8];
String type="4";//1禁用2满料3AGV未送物料占用4 空闲5空车占用 String type="4";//1禁用2满料3AGV未送物料占用4 空闲5空车占用
//禁用红色×有物料绿白车4百空空占用橙空 //禁用红色×有物料绿白车4百空空占用橙空
if(disabled.toString().equals("true")){ if("true".equals(disabled.toString())){
type="1"; type="1";
}else if(loc_status.equals("OCCUPY")&&inv_status.equals("OPEN")){ }else if("OCCUPY".equals(locStatus)&& "OPEN".equals(invStatus)){
type="2"; type="2";
}else if(loc_status.equals("OCCUPY")&&inv_status.equals("ZY")){ }else if("OCCUPY".equals(locStatus)&& "ZY".equals(invStatus)){
type="3"; type="3";
}else if(loc_status.equals("FREE")&&inv_status.equals("")){ }else if("FREE".equals(locStatus)&& "".equals(invStatus)){
type="4"; type="4";
}else if(loc_status.equals("OCCUPY")&&inv_status.equals("")){ }else if("OCCUPY".equals(locStatus)&& "".equals(invStatus)){
type="5"; type="5";
} }
d.put("id", obj[0]+""); d.put("id", obj[0]+"");
@ -125,23 +128,23 @@ public class ScreenMdController {
double percentage=sjCount*100*0.1*10/locCount; double percentage=sjCount*100*0.1*10/locCount;
// percentage=Math.round(percentage); // percentage=Math.round(percentage);
percentage=Double.parseDouble(df.format(percentage)); percentage=Double.parseDouble(df.format(percentage));
if(type.equals("1")){ if("1".equals(type)){
// color0="#04CDE6"; // color0="#04CDE6";
color1="#0CC8E6"; color1="#0CC8E6";
color1="#021334FF"; color1="#021334FF";
}else if(type.equals("2")){ }else if("2".equals(type)){
// color0="#73E239"; // color0="#73E239";
color1="#35B45E"; color1="#35B45E";
color1="#021334FF"; color1="#021334FF";
}else if(type.equals("3")){ }else if("3".equals(type)){
// color0="#FEBA6B"; // color0="#FEBA6B";
color1="#F29961"; color1="#F29961";
color1="#021334FF"; color1="#021334FF";
}else if(type.equals("4")){ }else if("4".equals(type)){
// color0="#E15E68"; // color0="#E15E68";
color1="#E53240"; color1="#E53240";
color1="#021334FF"; color1="#021334FF";
}else if(type.equals("5")){ }else if("5".equals(type)){
// color0="#A682E6"; // color0="#A682E6";
color1="#6244E6"; color1="#6244E6";
color1="#021334FF"; color1="#021334FF";

View File

@ -251,14 +251,14 @@ public class PointController {
JSONObject jsonObject = JSON.parseObject(json); JSONObject jsonObject = JSON.parseObject(json);
String smallArea = jsonObject.getString("smallArea") == null ? "" : jsonObject.getString("smallArea");//小库区 String smallArea = jsonObject.getString("smallArea") == null ? "" : jsonObject.getString("smallArea");//小库区
String description = jsonObject.getString("description") == null ? "" : jsonObject.getString("description");//存储类型 String description = jsonObject.getString("description") == null ? "" : jsonObject.getString("description");//存储类型
String areaId = jsonObject.getString("areaId") == null || jsonObject.getString("areaId").equals("") ? "0" : jsonObject.getString("areaId");//库区 String areaId = jsonObject.getString("areaId") == null || "".equals(jsonObject.getString("areaId")) ? "0" : jsonObject.getString("areaId");//库区
String enabled = jsonObject.getString("enabled") == null || jsonObject.getString("enabled").equals("") ? "" : jsonObject.getString("enabled");//是否启用 String enabled = jsonObject.getString("enabled") == null || "".equals(jsonObject.getString("enabled")) ? "" : jsonObject.getString("enabled");//是否启用
if ((description == null || description.length() <= 0) && (areaId.equals("0"))) { if ((description == null || description.length() <= 0) && ("0".equals(areaId))) {
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "存储类型和库区至少选择一项!", ""), HttpStatus.BAD_REQUEST); return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "存储类型和库区至少选择一项!", ""), HttpStatus.BAD_REQUEST);
} }
if ((description != null && description.length() > 0) && (!areaId.equals("0"))) { if ((description != null && description.length() > 0) && (!"0".equals(areaId))) {
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "存储类型和库区只能选择一项!", ""), HttpStatus.BAD_REQUEST); return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "存储类型和库区只能选择一项!", ""), HttpStatus.BAD_REQUEST);
} }
@ -271,7 +271,7 @@ public class PointController {
if (description != null && description.length() > 0) { if (description != null && description.length() > 0) {
Point point2 = pointList.get(0); Point point2 = pointList.get(0);
Area area = point2.getArea(); Area area = point2.getArea();
if (area.getName().equals("前后桶空车区")) { if ("前后桶空车区".equals(area.getName())) {
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), smallArea + "小库区为前后桶空车区,不能绑定存储类型!", ""), HttpStatus.BAD_REQUEST); return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), smallArea + "小库区为前后桶空车区,不能绑定存储类型!", ""), HttpStatus.BAD_REQUEST);
} }
for (Point point : pointList) { for (Point point : pointList) {
@ -282,7 +282,7 @@ public class PointController {
} }
//批量调整库区 //批量调整库区
if (!areaId.equals("0")) { if (!"0".equals(areaId)) {
AreaDto areaDto = areaService.findById(Long.parseLong(areaId)); AreaDto areaDto = areaService.findById(Long.parseLong(areaId));
Area area = areaService.toEntity(areaDto); Area area = areaService.toEntity(areaDto);
for (Point point : pointList) { for (Point point : pointList) {

View File

@ -401,7 +401,7 @@ public class StockServiceImpl implements StockService {
private AsnDetail createAsnDetail(Item item, Stock stock, Point srcPoint, String propC1, String boxNumber, String propC3, Timestamp propD1, double orderQty, String mo) { private AsnDetail createAsnDetail(Item item, Stock stock, Point srcPoint, String propC1, String boxNumber, String propC3, Timestamp propD1, double orderQty, String mo) {
AsnDetail asnDetail = new AsnDetail(); AsnDetail asnDetail = new AsnDetail();
asnDetail.setItem(item); asnDetail.setItem(item);
asnDetail.setLineNo(1l); asnDetail.setLineNo(1L);
asnDetail.setStatus(BizStatus.OPEN); asnDetail.setStatus(BizStatus.OPEN);
asnDetail.setOrderQty(orderQty); asnDetail.setOrderQty(orderQty);
asnDetail.setDept(item.getDept()); asnDetail.setDept(item.getDept());

View File

@ -84,8 +84,6 @@ public class StockTypeServiceImpl implements StockTypeService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public StockTypeDto create(StockType resources) { public StockTypeDto create(StockType resources) {
Snowflake snowflake = IdUtil.createSnowflake(1, 1);
resources.setId(snowflake.nextId());
return stockTypeMapper.toDto(stockTypeRepository.save(resources)); return stockTypeMapper.toDto(stockTypeRepository.save(resources));
} }

View File

@ -268,7 +268,7 @@ public class AgvTaskServiceImpl implements AgvTaskService {
String resultJson = HttpPostUtil.sendPostReq(UrlApi.submitMission(), jsonObject.toString()); String resultJson = HttpPostUtil.sendPostReq(UrlApi.submitMission(), jsonObject.toString());
JSONObject resulObject = JSON.parseObject(resultJson); JSONObject resulObject = JSON.parseObject(resultJson);
String code = resulObject.getString("code") == null ? "" : resulObject.getString("code"); String code = resulObject.getString("code") == null ? "" : resulObject.getString("code");
if (code.equals("0")) { if ("0".equals(code)) {
for (int i = 0; i < agvTasks.size(); i++) { for (int i = 0; i < agvTasks.size(); i++) {
AgvTask agvTask = agvTasks.get(i); AgvTask agvTask = agvTasks.get(i);
agvTask.setJobForce(agvCode);//任务组 agvTask.setJobForce(agvCode);//任务组

View File

@ -146,7 +146,7 @@ public class AsnDetailServiceImpl implements AsnDetailService {
public AsnDetail createAsnDetail(Item item, Stock stock, Point srcPoint, String propC1, String gdh, String propC3, Timestamp propD1, Double orderQty, String Po) { public AsnDetail createAsnDetail(Item item, Stock stock, Point srcPoint, String propC1, String gdh, String propC3, Timestamp propD1, Double orderQty, String Po) {
AsnDetail asnDetail = new AsnDetail(); AsnDetail asnDetail = new AsnDetail();
asnDetail.setItem(item); asnDetail.setItem(item);
asnDetail.setLineNo(1l); asnDetail.setLineNo(1L);
asnDetail.setStatus(BizStatus.OPEN); asnDetail.setStatus(BizStatus.OPEN);
asnDetail.setOrderQty(orderQty); asnDetail.setOrderQty(orderQty);
asnDetail.setDept(item.getDept()); asnDetail.setDept(item.getDept());

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -78,8 +78,6 @@ public class CountPlanServiceImpl implements CountPlanService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public CountPlanDto create(CountPlan resources) { public CountPlanDto create(CountPlan resources) {
Snowflake snowflake = IdUtil.createSnowflake(1, 1);
resources.setId(snowflake.nextId());
return countPlanMapper.toDto(countPlanRepository.save(resources)); return countPlanMapper.toDto(countPlanRepository.save(resources));
} }

View File

@ -286,11 +286,11 @@ public class PickDetailServiceImpl implements PickDetailService {
public List<Object[]> queryOut(String type, String date) { public List<Object[]> queryOut(String type, String date) {
String hql = ""; String hql = "";
if (type.equals("Day")) { if ("Day".equals(type)) {
hql = "select sum(d.orderQty),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m-%d')=DATE_FORMAT(now(),'%Y-%m-%d')"; hql = "select sum(d.orderQty),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m-%d')=DATE_FORMAT(now(),'%Y-%m-%d')";
} else if (type.equals("Month")) { } else if ("Month".equals(type)) {
hql = "select sum(d.orderQty),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m')=DATE_FORMAT(now(),'%Y-%m')"; hql = "select sum(d.orderQty),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m')=DATE_FORMAT(now(),'%Y-%m')";
} else if (type.equals("InOutDay")) { } else if ("InOutDay".equals(type)) {
hql = "select DATE_FORMAT(d.createTime,'%Y-%m-%d'),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m-%d')>='" + date + "' " + " group by DATE_FORMAT(d.createTime,'%Y-%m-%d')"; hql = "select DATE_FORMAT(d.createTime,'%Y-%m-%d'),sum(d.pickedQty) from PickDetail d " + " where DATE_FORMAT(d.createTime,'%Y-%m-%d')>='" + date + "' " + " group by DATE_FORMAT(d.createTime,'%Y-%m-%d')";
} }
Query query = entityMapper.createQuery(hql); Query query = entityMapper.createQuery(hql);

View File

@ -18,6 +18,6 @@ public class BaseComponent {
} }
@PostConstruct @PostConstruct
public void configUrlApi(){ public void configUrlApi(){
UserUtils.isDept=deptRepository.findById(7l); UserUtils.isDept=deptRepository.findById(7L);
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -126,16 +126,18 @@ public class UserServiceImpl implements UserService {
log.error(JSONObject.toJSONString(user.getRoles())); log.error(JSONObject.toJSONString(user.getRoles()));
log.error("------------"); log.error("------------");
log.error(JSONObject.toJSONString(resources.getRoles())); log.error(JSONObject.toJSONString(resources.getRoles()));
List<Role> list_role=roleRepository.findAll(); List<Role> listRole =roleRepository.findAll();
log.error("------------"); log.error("------------");
log.error(JSONObject.toJSONString(list_role)); log.error(JSONObject.toJSONString(listRole));
Set<Role> roleSet=new HashSet<>(); Set<Role> roleSet=new HashSet<>();
for (Role r1:resources.getRoles() ) { for (Role r1:resources.getRoles() ) {
for (Role r:list_role) { for (Role r:listRole) {
if(r1.getId()==r.getId()) if(r1.getId().equals(r.getId())){
roleSet.add(r); roleSet.add(r);
} }
}
} }
user.setRoles(roleSet); user.setRoles(roleSet);
redisUtils.del(CacheKey.DATA_USER + resources.getId()); redisUtils.del(CacheKey.DATA_USER + resources.getId());

View File

@ -10,6 +10,9 @@ import lombok.experimental.Accessors;
import org.icepear.echarts.origin.chart.bar.BarLabelOption; import org.icepear.echarts.origin.chart.bar.BarLabelOption;
import org.icepear.echarts.origin.util.TextCommonOption; import org.icepear.echarts.origin.util.TextCommonOption;
/**
* @author 92525
*/
@Accessors(chain = true) @Accessors(chain = true)
@Data @Data
public class BarLabel implements BarLabelOption { public class BarLabel implements BarLabelOption {
@ -141,7 +144,7 @@ public class BarLabel implements BarLabelOption {
private Number rotate; private Number rotate;
private Number[] offset; private Number[] offset=null;
private Number minMargin; private Number minMargin;