修复
This commit is contained in:
parent
3c1f3a3c37
commit
88c5652faa
|
|
@ -32,6 +32,7 @@ import java.util.*;
|
|||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
@EnableAsync
|
||||
public class JobComponent {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
/**
|
||||
|
|
@ -47,16 +48,16 @@ public class JobComponent {
|
|||
*/
|
||||
private final IWorkService workService;
|
||||
|
||||
private volatile boolean isSendingCommonTask = false;
|
||||
private volatile boolean isSendingPickOutTask = false;
|
||||
private volatile boolean isSendingPickTask = false;
|
||||
private boolean isSendingCommonTask = false;
|
||||
private boolean isSendingPickOutTask = false;
|
||||
private boolean isSendingPickTask = false;
|
||||
|
||||
/**
|
||||
* 向Wcs下发任务
|
||||
* 每2秒执行一次
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
@Async("myThreadPool")
|
||||
@Async
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
public void sendCommonTasks() {
|
||||
if (isSendingCommonTask) {
|
||||
|
|
@ -85,7 +86,7 @@ public class JobComponent {
|
|||
* 每2秒执行一次
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
@Async("myThreadPool")
|
||||
@Async
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
public void sendPickOutTasks() {
|
||||
if (isSendingPickOutTask) {
|
||||
|
|
@ -113,7 +114,7 @@ public class JobComponent {
|
|||
* 每2秒执行一次
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
@Async("myThreadPool")
|
||||
@Async
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
public void sendPickTasks() {
|
||||
if (isSendingPickTask) {
|
||||
|
|
@ -160,7 +161,7 @@ public class JobComponent {
|
|||
/**
|
||||
* 创建工作
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
@Scheduled(fixedDelay = 20000)
|
||||
public void createWork() {
|
||||
String createWork = configMap.get(ConfigMapKeyEnum.CREATE_WORK.getConfigKey());
|
||||
if (StringUtils.isEmpty(createWork) || !createWork.equals("1")) {
|
||||
|
|
@ -196,7 +197,7 @@ public class JobComponent {
|
|||
/**
|
||||
* 执行工作
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
@Scheduled(fixedDelay = 20000)
|
||||
public void doWork() {
|
||||
String startWork = configMap.get(ConfigMapKeyEnum.START_WORK.getConfigKey());
|
||||
if (StringUtils.isEmpty(startWork) || !startWork.equals("1")) {
|
||||
|
|
@ -228,7 +229,7 @@ public class JobComponent {
|
|||
* 每天晚上10点执行一次
|
||||
*/
|
||||
@Scheduled(cron = "0 0 22 * * ?")
|
||||
@Async("myThreadPool")
|
||||
@Async
|
||||
public void deleteOutOfDateData() {
|
||||
// 删除日志数据
|
||||
wmsJobService.deleteLogsRegularly();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import com.wms.annotation.MyLog;
|
||||
import com.wms.constants.enums.ResponseCode;
|
||||
import com.wms.entity.app.dto.PageDto;
|
||||
import com.wms.entity.app.request.ELocationConfigQuery;
|
||||
import com.wms.entity.app.request.ELocationQuery;
|
||||
import com.wms.entity.app.request.LocationQuery;
|
||||
import com.wms.entity.app.request.VehicleQuery;
|
||||
|
|
@ -16,8 +15,6 @@ import com.wms.entity.app.ResponseEntity;
|
|||
import com.wms.entity.app.vo.ELocationVo;
|
||||
import com.wms.entity.app.vo.LocationVo;
|
||||
import com.wms.entity.app.vo.VehicleVO;
|
||||
import com.wms.entity.app.wcs.WcsETaskFeedbackRequest;
|
||||
import com.wms.entity.table.ELocationConfig;
|
||||
import com.wms.entity.table.ETagLocation;
|
||||
import com.wms.entity.table.Location;
|
||||
import com.wms.entity.table.Vehicle;
|
||||
|
|
@ -41,7 +38,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.wms.utils.StringUtils.convertJsonString;
|
||||
|
||||
|
|
@ -257,16 +253,19 @@ public class LocationController {
|
|||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "生成电子标签库位表", logMethod = "genELocations")
|
||||
public String genELocations(@RequestBody ELocationQuery eLocationQuery) {
|
||||
// 9*64*22
|
||||
logger.info("接收到生成电子标签库位表数据请求:{},请求ip地址:{}", convertJsonString(eLocationQuery), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
ResponseEntity rsp = new ResponseEntity();
|
||||
try {
|
||||
List<ETagLocation> eLocations = new ArrayList<>();
|
||||
for (int i = 1; i <= 9; i++) {
|
||||
for (int j = 1; j <= 96; j++) {
|
||||
for (int j = 1; j <= 120; j++) {
|
||||
ETagLocation eTagLocation = new ETagLocation();
|
||||
eTagLocation.setELocationId(i + "-" + StringUtils.padLeft(String.valueOf(j), 2, "0"));
|
||||
if (j < 100) {
|
||||
eTagLocation.setELocationId(i + "-" + StringUtils.padLeft(String.valueOf(j), 2, "0"));
|
||||
} else {
|
||||
eTagLocation.setELocationId(i + "-" + StringUtils.padLeft(String.valueOf(j), 3, "0"));
|
||||
}
|
||||
eTagLocation.setAreaId(String.valueOf(i));
|
||||
eTagLocation.setSequenceId(j);
|
||||
eTagLocation.setELocationStatus(0);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.wms.constants.enums.*;
|
||||
import com.wms.entity.app.dto.KateOrdersDto;
|
||||
import com.wms.entity.app.dto.WorkCenterAndOrderDto;
|
||||
import com.wms.entity.app.dto.extend.StockDetailInfo;
|
||||
import com.wms.entity.table.*;
|
||||
import com.wms.service.*;
|
||||
|
|
@ -25,9 +25,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
|
@ -59,12 +57,9 @@ public class WorkServiceImplements implements IWorkService {
|
|||
private final StandService standService;// 站台服务
|
||||
private final TaskService taskService;// 任务服务
|
||||
private final WorkFlowLastService workFlowLastService;// 服务
|
||||
// private final List<String> workCreatingStations = new ArrayList<>();// 当前正在创建任务的站台
|
||||
// private final List<String> workDoingStations = new ArrayList<>();// 当前正在执行任务的站台
|
||||
// private final List<String> workFinishingStations = new ArrayList<>();// 当前正在完成任务的站台
|
||||
private final Map<String, Boolean> workCreatingStations = new ConcurrentHashMap<>();
|
||||
private final Map<String, Boolean> workDoingStations = new ConcurrentHashMap<>();
|
||||
private final Map<String, Boolean> workFinishingStations = new ConcurrentHashMap<>();
|
||||
private final List<String> workCreatingStations = new ArrayList<>();// 当前正在创建任务的站台
|
||||
private final List<String> workDoingStations = new ArrayList<>();// 当前正在执行任务的站台
|
||||
private final List<String> workFinishingStations = new ArrayList<>();// 当前正在完成任务的站台
|
||||
private final VehicleService vehicleService;// 料箱服务
|
||||
|
||||
/**
|
||||
|
|
@ -75,15 +70,18 @@ public class WorkServiceImplements implements IWorkService {
|
|||
@Override
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
public void createWork(String workStation) {
|
||||
if (workCreatingStations.contains(workStation)) {
|
||||
// 当前站台正在创建任务
|
||||
return;
|
||||
} else {
|
||||
// 添加站台
|
||||
workCreatingStations.add(workStation);
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty(workStation)) {
|
||||
// 站台号为空
|
||||
return;
|
||||
}
|
||||
if (workCreatingStations.putIfAbsent(workStation, Boolean.TRUE) != null) {
|
||||
// 当前站台正在创建任务
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// 先判断当日是否是工作日
|
||||
LocalDate currentWorkDate = LocalDate.now();
|
||||
|
|
@ -259,9 +257,12 @@ public class WorkServiceImplements implements IWorkService {
|
|||
@Override
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
public void doWork(String workStation) {
|
||||
if (workDoingStations.putIfAbsent(workStation, Boolean.TRUE) != null) {
|
||||
if (workDoingStations.contains(workStation)) {
|
||||
// 当前站台正在创建任务
|
||||
return;
|
||||
} else {
|
||||
// 添加站台
|
||||
workDoingStations.add(workStation);
|
||||
}
|
||||
try {
|
||||
// 查找当前站台未开始的工作流
|
||||
|
|
@ -448,9 +449,13 @@ public class WorkServiceImplements implements IWorkService {
|
|||
*/
|
||||
@Override
|
||||
public String finishWork(String workStation) {
|
||||
if (workFinishingStations.putIfAbsent(workStation, Boolean.TRUE) != null) {
|
||||
if (workFinishingStations.contains(workStation)) {
|
||||
// 当前站台正在完成工作
|
||||
return "当前站台正在完成工作,请勿重复操作";
|
||||
|
||||
} else {
|
||||
// 添加站台
|
||||
workFinishingStations.add(workStation);
|
||||
}
|
||||
String result = "";
|
||||
try {
|
||||
|
|
@ -558,161 +563,108 @@ public class WorkServiceImplements implements IWorkService {
|
|||
*/
|
||||
private void findWorks(String workStation, List<WorkFlow> workFlows, String model, LocalDate currentWorkDate) {
|
||||
// 查到当前站台所有的小工位
|
||||
// LambdaQueryWrapper<WorkStationConfig> stationConfigQueryWrapper = new LambdaQueryWrapper<WorkStationConfig>()
|
||||
// .eq(StringUtils.isNotEmpty(workStation), WorkStationConfig::getWorkStation, workStation);
|
||||
// if (Objects.equals(model, "MWL")) {
|
||||
// stationConfigQueryWrapper.eq(WorkStationConfig::getModel, "MWL");
|
||||
// } else {
|
||||
// stationConfigQueryWrapper.ne(WorkStationConfig::getModel, "MWL");
|
||||
// }
|
||||
// stationConfigQueryWrapper.orderByAsc(WorkStationConfig::getSmallBox);
|
||||
// List<WorkStationConfig> currentStationConfigsOfNwl = workStationConfigService.list(stationConfigQueryWrapper);
|
||||
// // 没有工站配置
|
||||
// if (currentStationConfigsOfNwl == null || currentStationConfigsOfNwl.isEmpty()) {
|
||||
// return;
|
||||
// }
|
||||
LambdaQueryWrapper<WorkStationConfig> stationConfigQueryWrapper = new LambdaQueryWrapper<WorkStationConfig>()
|
||||
.eq(StringUtils.isNotEmpty(workStation), WorkStationConfig::getWorkStation, workStation);
|
||||
if (Objects.equals(model, "MWL")) {
|
||||
stationConfigQueryWrapper.eq(WorkStationConfig::getModel, "MWL");
|
||||
} else {
|
||||
stationConfigQueryWrapper.ne(WorkStationConfig::getModel, "MWL");
|
||||
}
|
||||
stationConfigQueryWrapper.orderByAsc(WorkStationConfig::getSmallBox);
|
||||
List<WorkStationConfig> currentStationConfigsOfNwl = workStationConfigService.list(stationConfigQueryWrapper);
|
||||
// 没有工站配置
|
||||
if (currentStationConfigsOfNwl == null || currentStationConfigsOfNwl.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
// 今日开工的工单和小工位
|
||||
// Map<String, List<WorkCenterAndOrderDto>> tasksOfTodayMap = new HashMap<>();
|
||||
// 查询currentWorkDate的工单 连表查询 根据tbl_app_kate_order的work_order字段和tbL_app_kate_dbs的work_order字段
|
||||
//查询出supplay_area字段, 再根据supply_area字段查询tbl_app_e_location_config表的small_box字段相等的,根据
|
||||
//tbl_app_e_location_config的start_date_adjust字段的值,
|
||||
// 如果小于0,则在currentWorkDate减n的值,如果大于0,则在currentWorkDate加n的值,如果=0,则currentWorkDate
|
||||
KateOrdersDto kateOrders = new KateOrdersDto();
|
||||
kateOrders.setSortString(configMap.get(ConfigMapKeyEnum.SLOC_FILTER_STRING.getConfigKey()));
|
||||
kateOrders.setOrderStatus(0);
|
||||
String currentDay = currentWorkDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
kateOrders.setCurrentWorkDay(currentDay);
|
||||
kateOrders.setModel(model);
|
||||
kateOrders.setWorkStation(workStation);
|
||||
List<KateOrdersDto> allNewKateWorkOrders = kateOrdersService.selectCurrentWorkDateKateOrders(kateOrders);
|
||||
for (KateOrdersDto tempOrder : allNewKateWorkOrders) {
|
||||
// 生成workFlow
|
||||
WorkFlow tempWorkFlow = new WorkFlow();
|
||||
tempWorkFlow.setWorkFlowId(WmsUtils.generateId("WORKFLOW_"));
|
||||
tempWorkFlow.setOrderId(tempOrder.getOrderId());
|
||||
if("MWL".equals(model)) {
|
||||
tempWorkFlow.setWorkStation(tempOrder.getWorkStation());
|
||||
}else{
|
||||
tempWorkFlow.setWorkStation(workStation);
|
||||
Map<String, List<WorkCenterAndOrderDto>> tasksOfTodayMap = new HashMap<>();
|
||||
List<KateOrders> allNewKateWorkOrders = kateOrdersService.list(new LambdaQueryWrapper<KateOrders>()
|
||||
.eq(KateOrders::getOrderStatus, 0)
|
||||
.eq(KateOrders::getSortString, configMap.get(ConfigMapKeyEnum.SLOC_FILTER_STRING.getConfigKey())));
|
||||
// 查询所有的dbs
|
||||
List<KateDBS> allKateDBS = kateDBSService.list(new LambdaQueryWrapper<KateDBS>().orderByAsc(KateDBS::getWorkSequence));
|
||||
// 根据所有小工位,查到对应的任务
|
||||
for (WorkStationConfig workConfig : currentStationConfigsOfNwl) {
|
||||
// 查询当前小工位是否已经判断过开工日期
|
||||
if (StringUtils.isEmpty(workConfig.getSmallBox()) || tasksOfTodayMap.containsKey(workConfig.getSmallBox())) {
|
||||
continue;
|
||||
}
|
||||
// 通过工单表查询到对应的工单
|
||||
List<KateOrders> kateWorkOrders = allNewKateWorkOrders.stream().filter(kateWorkOrder ->
|
||||
kateWorkOrder.getSupplyArea().equals(workConfig.getSmallBox())).toList();
|
||||
// 当前工位没有未完成的工单
|
||||
if (kateWorkOrders.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
List<WorkCenterAndOrderDto> toDaysOrders = new ArrayList<>();
|
||||
// 防止重复查询
|
||||
Map<String, KateDBS> ordersAndDBSMap = new HashMap<>();
|
||||
for (KateOrders kateWorkOrder : kateWorkOrders) {
|
||||
if (!ordersAndDBSMap.containsKey(kateWorkOrder.getWorkOrder())) {
|
||||
// 从DBS表查询对应的工单以及开工时间
|
||||
KateDBS kateDBS = allKateDBS.stream().filter(tempKateDBS ->
|
||||
tempKateDBS.getWorkOrder().equals(kateWorkOrder.getWorkOrder())).findFirst().orElse(null);
|
||||
if (kateDBS == null || StringUtils.isEmpty(kateDBS.getWorkOrder())) {// 不存在对应的工单计划
|
||||
continue;
|
||||
}
|
||||
// 判断是否是当天开工
|
||||
int indexOfDbs = localWorkDateList.indexOf(kateDBS.getPlanStartDate().toLocalDate());
|
||||
if (indexOfDbs == -1) {
|
||||
// 工作日不包含此开工日期
|
||||
continue;
|
||||
}
|
||||
int indexAfterAdjust = indexOfDbs + workConfig.getStartDateAdjust();
|
||||
if (indexAfterAdjust < 0 || indexAfterAdjust >= localWorkDateList.size()) {
|
||||
// 调整后的日期不再工作日范围
|
||||
continue;
|
||||
}
|
||||
if (localWorkDateList.get(indexAfterAdjust).equals(currentWorkDate)) {
|
||||
// 已经查询过的为了不重复查询,添加map
|
||||
ordersAndDBSMap.put(kateWorkOrder.getWorkOrder(), kateDBS);
|
||||
// 添加工作计划
|
||||
WorkCenterAndOrderDto wcoDto = new WorkCenterAndOrderDto();
|
||||
wcoDto.setWorkCenter(workConfig.getSmallBox());
|
||||
wcoDto.setWorkOrder(kateWorkOrder.getWorkOrder());
|
||||
wcoDto.setStartDate(LocalDateTime.now().toLocalDate().atStartOfDay());
|
||||
wcoDto.setDbsSequence(kateDBS.getWorkSequence());
|
||||
toDaysOrders.add(wcoDto);
|
||||
}
|
||||
}
|
||||
}
|
||||
tasksOfTodayMap.put(workConfig.getSmallBox(), toDaysOrders);
|
||||
}
|
||||
// 判断是否有今天开工的工单和小工位
|
||||
if (!tasksOfTodayMap.isEmpty()) {
|
||||
for (String smallBoxKey : tasksOfTodayMap.keySet()) {
|
||||
List<WorkCenterAndOrderDto> currentWorkCenterAndOrderDtoList = tasksOfTodayMap.get(smallBoxKey).stream().sorted(Comparator.comparingInt(WorkCenterAndOrderDto::getDbsSequence)).toList();
|
||||
for (WorkCenterAndOrderDto currentWorkCenterAndOrderDto : currentWorkCenterAndOrderDtoList) {
|
||||
// 通过工单表查询到对应的工单
|
||||
List<KateOrders> kateWorkOrderList = allNewKateWorkOrders.stream().filter(kateWorkOrder ->
|
||||
kateWorkOrder.getWorkOrder().equals(currentWorkCenterAndOrderDto.getWorkOrder())
|
||||
&& kateWorkOrder.getSupplyArea().equals(currentWorkCenterAndOrderDto.getWorkCenter())).toList();
|
||||
for (KateOrders tempOrder : kateWorkOrderList) {
|
||||
// 生成workFlow
|
||||
WorkFlow tempWorkFlow = new WorkFlow();
|
||||
tempWorkFlow.setWorkFlowId(WmsUtils.generateId("WORKFLOW_"));
|
||||
tempWorkFlow.setOrderId(tempOrder.getOrderId());
|
||||
tempWorkFlow.setWorkStation(workStation);
|
||||
tempWorkFlow.setWorkOrder(tempOrder.getWorkOrder());
|
||||
tempWorkFlow.setWorkCenter(tempOrder.getSupplyArea());
|
||||
tempWorkFlow.setGoodsId(tempOrder.getGoodsId());
|
||||
tempWorkFlow.setNeedNum(tempOrder.getRequirementQuantity());
|
||||
tempWorkFlow.setCreateTime(LocalDateTime.now());
|
||||
tempWorkFlow.setWorkStatus(0);
|
||||
tempWorkFlow.setLightStatus(0);
|
||||
tempWorkFlow.setPickedNum(BigDecimal.ZERO);
|
||||
// 改动
|
||||
tempWorkFlow.setMachineType(Objects.equals(model, "MWL") ? 1 : 2);
|
||||
tempWorkFlow.setPlanDate(currentWorkDate);
|
||||
workFlows.add(tempWorkFlow);
|
||||
}
|
||||
}
|
||||
}
|
||||
tempWorkFlow.setWorkOrder(tempOrder.getWorkOrder());
|
||||
tempWorkFlow.setWorkCenter(tempOrder.getSupplyArea());
|
||||
tempWorkFlow.setGoodsId(tempOrder.getGoodsId());
|
||||
tempWorkFlow.setNeedNum(tempOrder.getRequirementQuantity());
|
||||
tempWorkFlow.setCreateTime(LocalDateTime.now());
|
||||
tempWorkFlow.setWorkStatus(0);
|
||||
tempWorkFlow.setLightStatus(0);
|
||||
tempWorkFlow.setPickedNum(BigDecimal.ZERO);
|
||||
// 改动
|
||||
tempWorkFlow.setMachineType(Objects.equals(model, "MWL") ? 1 : 2);
|
||||
tempWorkFlow.setPlanDate(currentWorkDate);
|
||||
workFlows.add(tempWorkFlow);
|
||||
}
|
||||
}
|
||||
// List<KateOrders> allNewKateWorkOrders = kateOrdersService.list(new LambdaQueryWrapper<KateOrders>()
|
||||
// .eq(KateOrders::getOrderStatus, 0)
|
||||
// .eq(KateOrders::getSortString, configMap.get(ConfigMapKeyEnum.SLOC_FILTER_STRING.getConfigKey())));
|
||||
// 查询所有的dbs
|
||||
// List<KateDBS> allKateDBS = kateDBSService.list(new LambdaQueryWrapper<KateDBS>().orderByAsc(KateDBS::getWorkSequence));
|
||||
// 根据所有小工位,查到对应的任务
|
||||
// for (WorkStationConfig workConfig : currentStationConfigsOfNwl) {
|
||||
// // 查询当前小工位是否已经判断过开工日期
|
||||
// if (StringUtils.isEmpty(workConfig.getSmallBox()) || tasksOfTodayMap.containsKey(workConfig.getSmallBox())) {
|
||||
// continue;
|
||||
// }
|
||||
// // 通过工单表查询到对应的工单
|
||||
// List<KateOrders> kateWorkOrders = allNewKateWorkOrders.stream().filter(kateWorkOrder ->
|
||||
// kateWorkOrder.getSupplyArea().equals(workConfig.getSmallBox())).toList();
|
||||
// // 当前工位没有未完成的工单
|
||||
// if (kateWorkOrders.isEmpty()) {
|
||||
// continue;
|
||||
// }
|
||||
// List<WorkCenterAndOrderDto> toDaysOrders = new ArrayList<>();
|
||||
// // 防止重复查询
|
||||
// Map<String, KateDBS> ordersAndDBSMap = new HashMap<>();
|
||||
// for (KateOrders kateWorkOrder : kateWorkOrders) {
|
||||
// if (!ordersAndDBSMap.containsKey(kateWorkOrder.getWorkOrder())) {
|
||||
// // 从DBS表查询对应的工单以及开工时间
|
||||
// KateDBS kateDBS = allKateDBS.stream().filter(tempKateDBS ->
|
||||
// tempKateDBS.getWorkOrder().equals(kateWorkOrder.getWorkOrder())).findFirst().orElse(null);
|
||||
// if (kateDBS == null || StringUtils.isEmpty(kateDBS.getWorkOrder())) {// 不存在对应的工单计划
|
||||
// continue;
|
||||
// }
|
||||
// // 判断是否是当天开工
|
||||
// int indexOfDbs = localWorkDateList.indexOf(kateDBS.getPlanStartDate().toLocalDate());
|
||||
// if (indexOfDbs == -1) {
|
||||
// // 工作日不包含此开工日期
|
||||
// continue;
|
||||
// }
|
||||
// int indexAfterAdjust = indexOfDbs + workConfig.getStartDateAdjust();
|
||||
// if (indexAfterAdjust < 0 || indexAfterAdjust >= localWorkDateList.size()) {
|
||||
// // 调整后的日期不再工作日范围
|
||||
// continue;
|
||||
// }
|
||||
// if (localWorkDateList.get(indexAfterAdjust).equals(currentWorkDate)) {
|
||||
// // 已经查询过的为了不重复查询,添加map
|
||||
// ordersAndDBSMap.put(kateWorkOrder.getWorkOrder(), kateDBS);
|
||||
// // 添加工作计划
|
||||
// WorkCenterAndOrderDto wcoDto = new WorkCenterAndOrderDto();
|
||||
// wcoDto.setWorkCenter(workConfig.getSmallBox());
|
||||
// wcoDto.setWorkOrder(kateWorkOrder.getWorkOrder());
|
||||
// wcoDto.setStartDate(LocalDateTime.now().toLocalDate().atStartOfDay());
|
||||
// wcoDto.setDbsSequence(kateDBS.getWorkSequence());
|
||||
// toDaysOrders.add(wcoDto);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// tasksOfTodayMap.put(workConfig.getSmallBox(), toDaysOrders);
|
||||
// }
|
||||
//过滤allNewKateWorkOrders,根据smallBox进行分组,然后根据workOrder进行排序,然后根据workSequence进行排序
|
||||
// Map<String, List<KateOrdersDto>> smallBoxAndKateOrdersMap = allNewKateWorkOrders.stream().collect(Collectors.groupingBy(KateOrdersDto::getSmallBox));
|
||||
// for (String smallBoxKey : smallBoxAndKateOrdersMap.keySet()) {
|
||||
// List<KateOrdersDto> kateWorkOrderList = smallBoxAndKateOrdersMap.get(smallBoxKey);
|
||||
// List<KateOrdersDto> kateWorkOrderListSorted = kateWorkOrderList.stream().sorted(Comparator.comparingInt(KateOrdersDto::getWorkSequence)).toList();
|
||||
// List<WorkCenterAndOrderDto> toDaysOrders = new ArrayList<>();
|
||||
// for (KateOrdersDto kateWorkOrder : kateWorkOrderListSorted) {
|
||||
// // 添加工作计划
|
||||
// WorkCenterAndOrderDto wcoDto = new WorkCenterAndOrderDto();
|
||||
// wcoDto.setWorkCenter(kateWorkOrder.getSmallBox());
|
||||
// wcoDto.setWorkOrder(kateWorkOrder.getWorkOrder());
|
||||
// wcoDto.setStartDate(LocalDateTime.now().toLocalDate().atStartOfDay());
|
||||
// wcoDto.setDbsSequence(kateWorkOrder.getWorkSequence());
|
||||
// toDaysOrders.add(wcoDto);
|
||||
// }
|
||||
// tasksOfTodayMap.put(smallBoxKey, toDaysOrders);
|
||||
// }
|
||||
// 判断是否有今天开工的工单和小工位
|
||||
// if (!tasksOfTodayMap.isEmpty()) {
|
||||
// for (String smallBoxKey : tasksOfTodayMap.keySet()) {
|
||||
// List<WorkCenterAndOrderDto> currentWorkCenterAndOrderDtoList = tasksOfTodayMap.get(smallBoxKey).stream().sorted(Comparator.comparingInt(WorkCenterAndOrderDto::getDbsSequence)).toList();
|
||||
// for (WorkCenterAndOrderDto currentWorkCenterAndOrderDto : currentWorkCenterAndOrderDtoList) {
|
||||
// // 通过工单表查询到对应的工单
|
||||
// List<KateOrders> kateWorkOrderList = allNewKateWorkOrders.stream().filter(kateWorkOrder ->
|
||||
// kateWorkOrder.getWorkOrder().equals(currentWorkCenterAndOrderDto.getWorkOrder())
|
||||
// && kateWorkOrder.getSupplyArea().equals(currentWorkCenterAndOrderDto.getWorkCenter())).toList();
|
||||
// for (KateOrders tempOrder : kateWorkOrderList) {
|
||||
// // 生成workFlow
|
||||
// WorkFlow tempWorkFlow = new WorkFlow();
|
||||
// tempWorkFlow.setWorkFlowId(WmsUtils.generateId("WORKFLOW_"));
|
||||
// tempWorkFlow.setOrderId(tempOrder.getOrderId());
|
||||
// tempWorkFlow.setWorkStation(workStation);
|
||||
// tempWorkFlow.setWorkOrder(tempOrder.getWorkOrder());
|
||||
// tempWorkFlow.setWorkCenter(tempOrder.getSupplyArea());
|
||||
// tempWorkFlow.setGoodsId(tempOrder.getGoodsId());
|
||||
// tempWorkFlow.setNeedNum(tempOrder.getRequirementQuantity());
|
||||
// tempWorkFlow.setCreateTime(LocalDateTime.now());
|
||||
// tempWorkFlow.setWorkStatus(0);
|
||||
// tempWorkFlow.setLightStatus(0);
|
||||
// tempWorkFlow.setPickedNum(BigDecimal.ZERO);
|
||||
// // 改动
|
||||
// tempWorkFlow.setMachineType(Objects.equals(model, "MWL") ? 1 : 2);
|
||||
// tempWorkFlow.setPlanDate(currentWorkDate);
|
||||
// workFlows.add(tempWorkFlow);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取当前的工作日期
|
||||
|
|
@ -753,6 +705,10 @@ public class WorkServiceImplements implements IWorkService {
|
|||
if (!localWorkDateList.contains(currentWorkDate)) {
|
||||
return;
|
||||
}
|
||||
if (workFlowService.exists(new LambdaQueryWrapper<>())) {
|
||||
// 工作流已经生成过,不做处理
|
||||
return;
|
||||
}
|
||||
// 添加进总汇总数据
|
||||
List<WorkFlow> allFlows = new ArrayList<>();
|
||||
// 获取当天所有的装载机工作
|
||||
|
|
@ -760,12 +716,12 @@ public class WorkServiceImplements implements IWorkService {
|
|||
findWorks("", thisDayMWLWorks, "MWL", currentWorkDate);
|
||||
if (!thisDayMWLWorks.isEmpty()) {
|
||||
allFlows.addAll(thisDayMWLWorks);
|
||||
}else{
|
||||
} else {
|
||||
System.out.println("查询MWL为空");
|
||||
}
|
||||
// 获取到当天所有的平地机工作
|
||||
List<WorkFlow> thisDayMGWorks = new ArrayList<>();
|
||||
findWorks("", thisDayMGWorks, "MG", currentWorkDate);
|
||||
findWorks("", thisDayMGWorks, "NOT_MWL", currentWorkDate);
|
||||
if (!thisDayMGWorks.isEmpty()) {
|
||||
allFlows.addAll(thisDayMGWorks);
|
||||
// 查询配置是否需要合并第二天的配置
|
||||
|
|
@ -776,59 +732,55 @@ public class WorkServiceImplements implements IWorkService {
|
|||
// 获取下一个工作日
|
||||
LocalDate nextWorkDate = nextWorkDate(currentWorkDate);
|
||||
if (nextWorkDate != null && nextWorkDate.isAfter(currentWorkDate)) {
|
||||
findWorks("", nextDayMGWorks, "MG", nextWorkDate);
|
||||
findWorks("", nextDayMGWorks, "NOT_MWL", nextWorkDate);
|
||||
}
|
||||
if (!nextDayMGWorks.isEmpty()) {
|
||||
// 添加第二天的平地机工作进汇总
|
||||
allFlows.addAll(nextDayMGWorks);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
System.out.println("查询MG为空");
|
||||
}
|
||||
// 处理这些工作流
|
||||
// List<WorkFlow> oldWorkFlows = workFlowService.list();
|
||||
// // 按照工单号+小盒子号+料号来map一下
|
||||
// Map<String, WorkFlow> oldWorkFlowsMap = oldWorkFlows.stream().collect(
|
||||
// Collectors.toMap(workFlow ->
|
||||
// workFlow.getWorkOrder() + "_" + workFlow.getWorkCenter() + "_" + workFlow.getGoodsId(), workFlow -> workFlow));
|
||||
// 最后需要存储的工作
|
||||
// List<WorkFlow> finalWorkFlows = new ArrayList<>();
|
||||
// for (WorkFlow workFlow : allFlows) {
|
||||
// String key = workFlow.getWorkOrder() + "_" + workFlow.getWorkCenter() + "_" + workFlow.getGoodsId();
|
||||
// if (oldWorkFlowsMap.containsKey(key)) {
|
||||
// continue;
|
||||
// }
|
||||
// workFlow.setWorkStatus(-1);// 设置暂存状态
|
||||
// finalWorkFlows.add(workFlow);
|
||||
// }
|
||||
// if (!finalWorkFlows.isEmpty()) {
|
||||
if (!allFlows.isEmpty()) {
|
||||
// 存储数据
|
||||
//设置allFlows的workStatus=-1
|
||||
allFlows.forEach(workFlow -> workFlow.setWorkStatus(-1)); //暂存状态
|
||||
workFlowService.saveBatch(allFlows);
|
||||
// 更新工单状态
|
||||
// List<String> orderIds = finalWorkFlows.stream().map(WorkFlow::getOrderId).toList();
|
||||
List<String> orderIds = allFlows.stream().map(WorkFlow::getOrderId).toList();
|
||||
if (!orderIds.isEmpty()) {
|
||||
kateOrdersService.update(new LambdaUpdateWrapper<KateOrders>()
|
||||
.set(KateOrders::getOrderStatus, 1)
|
||||
.in(KateOrders::getOrderId, orderIds)
|
||||
.eq(KateOrders::getOrderStatus, 0));
|
||||
// 处理这些工作流
|
||||
List<WorkFlow> oldWorkFlows = workFlowService.list();
|
||||
// 按照工单号+小盒子号+料号来map一下
|
||||
Map<String, WorkFlow> oldWorkFlowsMap = oldWorkFlows.stream().collect(
|
||||
Collectors.toMap(workFlow ->
|
||||
workFlow.getWorkOrder() + "_" + workFlow.getWorkCenter() + "_" + workFlow.getGoodsId(), workFlow -> workFlow));
|
||||
// 最后需要存储的工作
|
||||
List<WorkFlow> finalWorkFlows = new ArrayList<>();
|
||||
for (WorkFlow workFlow : allFlows) {
|
||||
String key = workFlow.getWorkOrder() + "_" + workFlow.getWorkCenter() + "_" + workFlow.getGoodsId();
|
||||
if (oldWorkFlowsMap.containsKey(key)) {
|
||||
continue;
|
||||
}
|
||||
workFlow.setWorkStatus(-1);// 设置暂存状态
|
||||
finalWorkFlows.add(workFlow);
|
||||
}
|
||||
// 更新dbs表
|
||||
// List<String> workOrderList = finalWorkFlows.stream().map(WorkFlow::getWorkOrder).distinct().toList();
|
||||
List<String> workOrderList = allFlows.stream().map(WorkFlow::getWorkOrder).distinct().toList();
|
||||
if (!workOrderList.isEmpty()) {
|
||||
kateDBSService.update(new LambdaUpdateWrapper<KateDBS>()
|
||||
.set(KateDBS::getDbsStatus, 1)
|
||||
.in(KateDBS::getWorkOrder, workOrderList)
|
||||
.eq(KateDBS::getDbsStatus, 0));
|
||||
if (!finalWorkFlows.isEmpty()) {
|
||||
// 存储数据
|
||||
workFlowService.saveBatch(finalWorkFlows);
|
||||
// 更新工单状态
|
||||
List<String> orderIds = finalWorkFlows.stream().map(WorkFlow::getOrderId).toList();
|
||||
if (!orderIds.isEmpty()) {
|
||||
kateOrdersService.update(new LambdaUpdateWrapper<KateOrders>()
|
||||
.set(KateOrders::getOrderStatus, 1)
|
||||
.in(KateOrders::getOrderId, orderIds)
|
||||
.eq(KateOrders::getOrderStatus, 0));
|
||||
}
|
||||
// 更新dbs表
|
||||
List<String> workOrderList = finalWorkFlows.stream().map(WorkFlow::getWorkOrder).distinct().toList();
|
||||
if (!workOrderList.isEmpty()) {
|
||||
kateDBSService.update(new LambdaUpdateWrapper<KateDBS>()
|
||||
.set(KateDBS::getDbsStatus, 1)
|
||||
.in(KateDBS::getWorkOrder, workOrderList)
|
||||
.eq(KateDBS::getDbsStatus, 0));
|
||||
}
|
||||
System.out.println("createTempWorkFlows 成功");
|
||||
}
|
||||
System.out.println("createTempWorkFlows 成功");
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
System.out.println("createTempWorkFlows 为空");
|
||||
}
|
||||
|
||||
|
|
@ -842,58 +794,42 @@ public class WorkServiceImplements implements IWorkService {
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void distributeWorks(String workStation) {
|
||||
if (workCreatingStations.contains(workStation)) {
|
||||
// 当前站台正在创建任务
|
||||
return;
|
||||
} else {
|
||||
// 添加站台
|
||||
workCreatingStations.add(workStation);
|
||||
}
|
||||
if (StringUtils.isEmpty(workStation)) {
|
||||
// 站台号为空
|
||||
logger.error("站台号为空===》》》》》》");
|
||||
return;
|
||||
}
|
||||
if (workCreatingStations.putIfAbsent(workStation, Boolean.TRUE) != null) {
|
||||
// 当前站台正在创建任务
|
||||
logger.warn("当前站台正常创建任务:{}",workStation);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 获取工作优先级
|
||||
String workPriority = configMap.get(ConfigMapKeyEnum.WORK_PRIORITY.getConfigKey());
|
||||
List<WorkFlow> needDistributeWorks = new ArrayList<>();
|
||||
List<WorkFlow> commonMwlWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>());
|
||||
// .eq(WorkFlow::getWorkStation, workStation)
|
||||
// .eq(WorkFlow::getMachineType, 1)
|
||||
// .ne(WorkFlow::getWorkStatus, -1));
|
||||
int currentWorkType = -1;
|
||||
List<WorkFlow> commonMwlWorks = workFlowService.list(new LambdaQueryWrapper<>());
|
||||
int currentWorkType;
|
||||
List<WorkFlow> doingWorks = filterWorkFlow(commonMwlWorks, workStation, 0, -1, -1);
|
||||
if (!doingWorks.isEmpty()) {
|
||||
// 当前站台还有正在做的工作,不允许再分配新工作
|
||||
return;
|
||||
}
|
||||
if (!StringUtils.isEmpty(workPriority) && workPriority.equals("1")) {
|
||||
// 当前工作优先级为先平地机后装载机
|
||||
// 查询当前站台是否还有装载机的任务没做完
|
||||
// List<WorkFlow> oldMwlWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getWorkStation, workStation)
|
||||
// .eq(WorkFlow::getMachineType, 1)
|
||||
// .ne(WorkFlow::getWorkStatus, -1));
|
||||
//过滤commonMwlWorks 根据workStation和machineType和workStatus=-1 workStation=workStation
|
||||
List<WorkFlow> oldMwlWorks = filterWorkFlow(commonMwlWorks, workStation, 2, -1, -1);
|
||||
if (!oldMwlWorks.isEmpty()) {
|
||||
// 装载机没做完,不允许做平地机
|
||||
return;
|
||||
}
|
||||
// 查询已经生成的工作
|
||||
// List<WorkFlow> oldWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getMachineType, 2)
|
||||
// .eq(WorkFlow::getWorkStatus, -1));
|
||||
//过滤commonMwlWorks 根据machineType=2
|
||||
List<WorkFlow> oldWorkFlows = filterWorkFlow(commonMwlWorks, null, 2, -1, 0);
|
||||
if (oldWorkFlows.isEmpty()) {
|
||||
// 判断下是否有平地机任务还未生成
|
||||
List<WorkFlow> notCreatedMGWorks = new ArrayList<>();
|
||||
findWorks("", notCreatedMGWorks, "MG", getCurrentWorkDate());
|
||||
findWorks("", notCreatedMGWorks, "NOT_MWL", getCurrentWorkDate());
|
||||
if (!notCreatedMGWorks.isEmpty()) {
|
||||
// 仍有未生成的平地机任务,跳过
|
||||
return;
|
||||
}
|
||||
//过滤commonMwlWorks 根据machineType=2,workStatus=-1 和workStation=1
|
||||
List<WorkFlow> doingMgWorkFlows = filterWorkFlow(commonMwlWorks, workStation, 2, -1, -1);
|
||||
// List<WorkFlow> doingMgWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getWorkStation, workStation)
|
||||
// .eq(WorkFlow::getMachineType, 2)
|
||||
// .ne(WorkFlow::getWorkStatus, -1));
|
||||
List<WorkFlow> doingMgWorkFlows = filterWorkFlow(commonMwlWorks, workStation, 2, -1, -1);
|
||||
if (!doingMgWorkFlows.isEmpty()) {
|
||||
// 当前站台平地机正在做
|
||||
return;
|
||||
|
|
@ -901,9 +837,6 @@ public class WorkServiceImplements implements IWorkService {
|
|||
// 查询装载机
|
||||
//过滤commonMwlWorks 根据machineType=1,workStatus=-1
|
||||
List<WorkFlow> mwlWorks = filterWorkFlow(commonMwlWorks, null, 1, -1, 0);
|
||||
// List<WorkFlow> mwlWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getMachineType, 1)
|
||||
// .eq(WorkFlow::getWorkStatus, -1));
|
||||
if (mwlWorks.isEmpty()) {
|
||||
// 没有装载机任务,跳过
|
||||
return;
|
||||
|
|
@ -916,20 +849,6 @@ public class WorkServiceImplements implements IWorkService {
|
|||
}
|
||||
} else {
|
||||
// 默认优先级为先装载机后平地机
|
||||
// 查询当前站台是否还有平地机的任务没做完
|
||||
//过滤commonMwlWorks 根据machineType=2,workStatus !=-1 和workStation=1
|
||||
List<WorkFlow> oldMgWorks = filterWorkFlow(commonMwlWorks, workStation, 2, -1, -1);
|
||||
// List<WorkFlow> oldMgWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getWorkStation, workStation)
|
||||
// .eq(WorkFlow::getMachineType, 2)
|
||||
// .ne(WorkFlow::getWorkStatus, -1));
|
||||
if (!oldMgWorks.isEmpty()) {
|
||||
// 平地机没做完,不允许做装载机
|
||||
return;
|
||||
}
|
||||
// List<WorkFlow> oldWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getMachineType, 1)
|
||||
// .eq(WorkFlow::getWorkStatus, -1));
|
||||
List<WorkFlow> oldWorkFlows = filterWorkFlow(commonMwlWorks, null, 1, -1, 0);
|
||||
if (oldWorkFlows.isEmpty()) {
|
||||
// 判断下是否有装载机任务还未生成
|
||||
|
|
@ -939,19 +858,12 @@ public class WorkServiceImplements implements IWorkService {
|
|||
// 仍有未生成的装载机任务,跳过
|
||||
return;
|
||||
}
|
||||
// List<WorkFlow> doingMwlWorkFlows = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getWorkStation, workStation)
|
||||
// .eq(WorkFlow::getMachineType, 1)
|
||||
// .ne(WorkFlow::getWorkStatus, -1));
|
||||
List<WorkFlow> doingMwlWorkFlows = filterWorkFlow(commonMwlWorks, workStation, 1, -1, -1);
|
||||
if (!doingMwlWorkFlows.isEmpty()) {
|
||||
// 当前站台装载机正在做
|
||||
return;
|
||||
}
|
||||
// 查询平地机
|
||||
// List<WorkFlow> mgWorks = workFlowService.list(new LambdaQueryWrapper<WorkFlow>()
|
||||
// .eq(WorkFlow::getMachineType, 2)
|
||||
// .eq(WorkFlow::getWorkStatus, -1));
|
||||
List<WorkFlow> mgWorks = filterWorkFlow(commonMwlWorks, null, 2, -1, 0);
|
||||
if (mgWorks.isEmpty()) {
|
||||
// 没有平地机任务,跳过
|
||||
|
|
@ -1142,6 +1054,7 @@ public class WorkServiceImplements implements IWorkService {
|
|||
.set(WorkFlow::getWorkStation, workStation)
|
||||
.in(WorkFlow::getWorkFlowId, flowIds));
|
||||
}
|
||||
System.out.println("分配站台" + workStation + "工作完成");
|
||||
} catch (Exception e) {
|
||||
logger.error("分配站台:{}工作发生异常:{}", workStation, convertJsonString(e));
|
||||
// 回滚事务
|
||||
|
|
@ -1153,15 +1066,16 @@ public class WorkServiceImplements implements IWorkService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 过滤工作流
|
||||
*
|
||||
* @param workFlows
|
||||
* @param workStation
|
||||
* @param machineType
|
||||
* @param workStatus
|
||||
* @param flag 0: eq -1:ne
|
||||
* @return
|
||||
* @param workFlows 工作流
|
||||
* @param workStation 工作站台
|
||||
* @param machineType 机型
|
||||
* @param workStatus 工作状态
|
||||
* @param flag 0: eq -1:ne
|
||||
* @return 过滤后的数据
|
||||
*/
|
||||
private List<WorkFlow> filterWorkFlow(List<WorkFlow> workFlows,String workStation,int machineType,int workStatus,int flag){
|
||||
private List<WorkFlow> filterWorkFlow(List<WorkFlow> workFlows, String workStation, int machineType, int workStatus, int flag) {
|
||||
Stream<WorkFlow> stream = workFlows.stream();
|
||||
|
||||
if (StringUtils.isNotEmpty(workStation)) {
|
||||
|
|
|
|||
|
|
@ -12,19 +12,13 @@ spring:
|
|||
username: developer
|
||||
password: developer
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
#
|
||||
# url: jdbc:mysql://127.0.0.1:3306/wms_szkt?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: Root123456
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
# 宝开服务器--内网
|
||||
# url: jdbc:mysql://192.168.3.254:3306/wms_kate_suzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# username: coder
|
||||
# password: coder
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
## # 本地环境
|
||||
# url: jdbc:mysql://localhost:3306/wms_kate_suzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# 本地环境
|
||||
# url: jdbc:mysql://localhost:3306/wms_kate_suzhou_test?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
# username: root
|
||||
# password: liangzhou
|
||||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user