no message
parent
0903643bf3
commit
ccfa17690f
2
pom.xml
2
pom.xml
|
|
@ -146,7 +146,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>5.2.0</version>
|
||||
<version>4.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-04-12T19:52:30+0800",
|
||||
date = "2024-04-16T16:19:37+0800",
|
||||
comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_202 (Oracle Corporation)"
|
||||
)
|
||||
@Component
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-04-12T19:52:32+0800",
|
||||
date = "2024-04-16T16:19:37+0800",
|
||||
comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_202 (Oracle Corporation)"
|
||||
)
|
||||
@Component
|
||||
|
|
|
|||
|
|
@ -39,18 +39,7 @@
|
|||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot-starter</artifactId>
|
||||
<version>1.6.6</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
|
||||
</dependency>
|
||||
|
||||
<!-- 通用模块 -->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class ItemKey extends BaseEntity implements Serializable {
|
|||
private Item item;
|
||||
|
||||
@Column(name = "`prop_c1`")
|
||||
@ApiModelProperty(value = "批次号")
|
||||
@ApiModelProperty(value = "标签号")
|
||||
private String propC1;
|
||||
|
||||
@Column(name = "`prop_c2`")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.youchain.businessdata.rest;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.s7connector.api.S7Connector;
|
||||
import com.youchain.annotation.AnonymousAccess;
|
||||
import com.youchain.annotation.Log;
|
||||
|
|
@ -36,14 +37,24 @@ public class PlcController {
|
|||
@AnonymousAccess
|
||||
@Log("PLC扫描容器")
|
||||
@ApiOperation("PLC扫描容器")
|
||||
public ResponseEntity<Object> scanMo(@RequestBody String mo) {
|
||||
public ResponseEntity<Object> scanMo(@RequestBody String moJson) {
|
||||
/*S7Connector connector = S7ConnectorUtils.connect();
|
||||
if (connector == null) {
|
||||
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "PLC连接失败", ""), HttpStatus.BAD_REQUEST);
|
||||
}*/
|
||||
try {
|
||||
JSONObject json = JSONObject.parseObject(moJson);
|
||||
if (json == null) {
|
||||
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), "参数错误", ""), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
String mo = json.getString("mo");
|
||||
moService.scanMo(mo);
|
||||
S7Connector s7Connector = S7ConnectorUtils.connect();
|
||||
S7ConnectorUtils.write(s7Connector,1);
|
||||
//S7ConnectorUtils.write(connector,2);
|
||||
return new ResponseEntity<>(ApiResult.success(OK.value(), "", ""), HttpStatus.OK);
|
||||
} catch (Exception e) {
|
||||
//S7ConnectorUtils.write(connector,1);
|
||||
return new ResponseEntity<>(ApiResult.success(BAD_REQUEST.value(), e.getMessage(), ""), HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ public interface OrderService {
|
|||
OrderDto findById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据deliveryLineId查询
|
||||
* @param deliveryLineId deliveryLineId
|
||||
* 根据DeliveryHeaderId查询
|
||||
* @param findByDeliveryHeaderId findByDeliveryHeaderId
|
||||
* @return OrderDto
|
||||
*/
|
||||
OrderDto findBydeliveryLineId(Integer deliveryLineId);
|
||||
OrderDto findByDeliveryHeaderId(Integer findByDeliveryHeaderId);
|
||||
|
||||
/**
|
||||
* 根据barcodeNumber查询
|
||||
|
|
|
|||
|
|
@ -122,4 +122,11 @@ public interface TaskService {
|
|||
*/
|
||||
List<RPTaskList> queryTaskApp(IPTask t);
|
||||
|
||||
/**
|
||||
* 查询待拣货任务
|
||||
* @param labelNo 条件参数
|
||||
* @return List<Task>
|
||||
*/
|
||||
List<Task> findByLabelNo(String labelNo);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ public class TaskDto implements Serializable {
|
|||
/** agvID */
|
||||
private AgvTaskDto agvTask;
|
||||
|
||||
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
|
||||
|
|
|
|||
|
|
@ -71,4 +71,10 @@ public class TaskQueryCriteria{
|
|||
//agv状态
|
||||
@Query(joinName = "agvTask", propName="status",type = Query.Type.IN)
|
||||
private List<String> agvStatus;
|
||||
|
||||
@Query(joinName = "itemKey", propName="orderNumber",type = Query.Type.INNER_LIKE)
|
||||
private String orderNumber;
|
||||
|
||||
@Query(joinName = "itemKey", propName="propC1",type = Query.Type.INNER_LIKE)
|
||||
private String propC1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,13 +471,7 @@ public class AgvTaskServiceImpl implements AgvTaskService {
|
|||
if (status.equals("ARRIVED")) {
|
||||
|
||||
} else if (status.equals("UP_CONTAINER")) {
|
||||
Point startPoint = pointService.findByCode(agvTask.getStartSlotCode(), null, null, null, null);
|
||||
//顶升释放起点位置状态及容器绑定的起点位置
|
||||
startPoint.setStatus(BaseStatus.FREE);
|
||||
pointService.update(startPoint);
|
||||
agvTask.setStockCode(containerCode);
|
||||
agvTask.setStatus(BizStatus.UP_CONTAINER);
|
||||
this.update(agvTask);
|
||||
|
||||
} else if (status.equals("COMPLETED")) {
|
||||
//任务完成;根据AGV任务的目标点位走对应流程
|
||||
Point endPoint = pointService.findByCode(agvTask.getEndSlotCode(), null, null, null, null);
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@ public class AsnDetailServiceImpl implements AsnDetailService {
|
|||
asnDetail.setItem(item);
|
||||
asnDetail.setLineNo(1l);
|
||||
asnDetail.setStatus(BizStatus.OPEN);
|
||||
asnDetail.setOrderQty(item.getExtendD1());
|
||||
asnDetail.setDept(item.getDept());
|
||||
asnDetail.setStock(stock);
|
||||
asnDetail.setPoint(srcPoint);
|
||||
|
|
|
|||
|
|
@ -157,26 +157,42 @@ public class MlsServiceImpl implements MlsService {
|
|||
String deliveryStatus = detail.getString("deliveryStatus");//送货单状态
|
||||
|
||||
//直接接收已合格的送货单
|
||||
if ("Y".equals(isIqcInspected)) {
|
||||
OrderDto orderdto = orderService.findByBarcodeNumber(barcodeNumber);
|
||||
if (orderdto == null) {
|
||||
//创建
|
||||
Order newOrder = new Order(deliveryHeaderId, null, null,
|
||||
deliveryNumber, barcodeNumber, deliveryStatus, receivedInvCode, receivedInvName,
|
||||
receivedAreaCode, receivedAreaName, receivedLocationCode, receivedLocationName,
|
||||
itemCode, deliveryQty, inInspector, receivedQty, isIqcInspected, iqcResult, isCreatedLabel,
|
||||
supplierCode, supplierName, mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp()
|
||||
);
|
||||
orderService.create(newOrder);
|
||||
} else {
|
||||
//更新
|
||||
Order order = orderService.toEntity(orderdto);
|
||||
order.setDeliveryStatus(deliveryStatus);
|
||||
orderService.update(order);
|
||||
}
|
||||
|
||||
|
||||
OrderDto orderdto = orderService.findByBarcodeNumber(barcodeNumber);
|
||||
if (orderdto == null) {
|
||||
//创建
|
||||
Order newOrder = new Order(deliveryHeaderId, null, null,
|
||||
deliveryNumber, barcodeNumber, deliveryStatus, receivedInvCode, receivedInvName,
|
||||
receivedAreaCode, receivedAreaName, receivedLocationCode, receivedLocationName,
|
||||
itemCode, deliveryQty, inInspector, receivedQty, isIqcInspected, iqcResult, isCreatedLabel,
|
||||
supplierCode, supplierName, mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp()
|
||||
);
|
||||
orderService.create(newOrder);
|
||||
} else {
|
||||
//更新
|
||||
Order order = orderService.toEntity(orderdto);
|
||||
order.setDeliveryHeaderId(deliveryHeaderId);
|
||||
order.setDeliveryNumber(deliveryNumber);
|
||||
order.setDeliveryStatus(deliveryStatus);
|
||||
order.setReceivedInvCode(receivedInvCode);
|
||||
order.setReceivedInvName(receivedInvName);
|
||||
order.setReceivedAreaCode(receivedAreaCode);
|
||||
order.setReceivedAreaName(receivedAreaName);
|
||||
order.setReceivedLocationCode(receivedLocationCode);
|
||||
order.setReceivedLocationName(receivedLocationName);
|
||||
order.setItemCode(itemCode);
|
||||
order.setDeliveryQty(deliveryQty);
|
||||
order.setInInspector(inInspector);
|
||||
order.setReceivedQty(receivedQty);
|
||||
order.setIsIqcInspected(isIqcInspected);
|
||||
order.setIqcResult(iqcResult);
|
||||
order.setIsCreatedLabel(isCreatedLabel);
|
||||
order.setSupplierCode(supplierCode);
|
||||
order.setSupplierName(supplierName);
|
||||
order.setMlsUpdateTime(mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp());
|
||||
orderService.update(order);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -260,36 +276,55 @@ public class MlsServiceImpl implements MlsService {
|
|||
String goodsLocationCode = detail.getString("goodsLocationCode");//MLS货位
|
||||
String invCode = detail.getString("invCode");//MLS子库
|
||||
|
||||
//接收有效的MO票
|
||||
if ("PRINTED".equals(labelState)) {
|
||||
//判断物料是否存在;不存在新增;
|
||||
ItemDto itemDto = itemService.findByCode(itemCode);
|
||||
Item item = itemService.toEntity(itemDto);
|
||||
if (item == null) {
|
||||
item = new Item();
|
||||
item.setCode(itemCode);
|
||||
item.setName(itemDesc);
|
||||
item.setUnit(uom);
|
||||
DeptDto deptDto = deptService.findById(7L);
|
||||
Dept dept = deptService.toEntity(deptDto);
|
||||
item.setDept(dept);
|
||||
item.setSourceName(sourceSystem);
|
||||
item.setSourceId(itemId);
|
||||
itemService.create(item);
|
||||
}
|
||||
|
||||
MoDto moDto = moService.findByLabelNo(labelNo);
|
||||
if (moDto == null) {
|
||||
Mo mo = new Mo(labelNo, labelType, labelState, deliveryHeaderId, sourceSystem, qty,
|
||||
workOrderId, workOrderName, selfWorkOrderId, selfWorkOrderName, null, item,
|
||||
checkResult, Boolean.parseBoolean(deleteFlag), null, null, null, null, invCode, goodsAreaCode, goodsLocationCode,
|
||||
datetimeStockIn == null ? null : DateUtil.parse(datetimeStockIn).toTimestamp(),
|
||||
mlsCreateTime == null ? null : DateUtil.parse(mlsCreateTime).toTimestamp(),
|
||||
mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp(),
|
||||
createUserCode, updateUserCode
|
||||
);
|
||||
moService.create(mo);
|
||||
}
|
||||
//判断物料是否存在;不存在新增;
|
||||
ItemDto itemDto = itemService.findByCode(itemCode);
|
||||
Item item = itemService.toEntity(itemDto);
|
||||
if (item == null) {
|
||||
item = new Item();
|
||||
item.setCode(itemCode);
|
||||
item.setName(itemDesc);
|
||||
item.setUnit(uom);
|
||||
DeptDto deptDto = deptService.findById(7L);
|
||||
Dept dept = deptService.toEntity(deptDto);
|
||||
item.setDept(dept);
|
||||
item.setSourceName(sourceSystem);
|
||||
item.setSourceId(itemId);
|
||||
itemService.create(item);
|
||||
}
|
||||
|
||||
MoDto moDto = moService.findByLabelNo(labelNo);
|
||||
if (moDto == null) {
|
||||
Mo mo = new Mo(labelNo, labelType, labelState, deliveryHeaderId, sourceSystem, qty,
|
||||
workOrderId, workOrderName, selfWorkOrderId, selfWorkOrderName, null, item,
|
||||
checkResult, Boolean.parseBoolean(deleteFlag), null, null, null, null, invCode, goodsAreaCode, goodsLocationCode,
|
||||
datetimeStockIn == null ? null : DateUtil.parse(datetimeStockIn).toTimestamp(),
|
||||
mlsCreateTime == null ? null : DateUtil.parse(mlsCreateTime).toTimestamp(),
|
||||
mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp(),
|
||||
createUserCode, updateUserCode
|
||||
);
|
||||
moService.create(mo);
|
||||
} else {
|
||||
Mo mo = moService.toEntity(moDto);
|
||||
mo.setLabelType(labelType);
|
||||
mo.setLabelState(labelState);
|
||||
mo.setDeliveryHeaderId(deliveryHeaderId);
|
||||
mo.setSourceSystem(sourceSystem);
|
||||
mo.setQty(qty);
|
||||
mo.setWorkOrderId(workOrderId);
|
||||
mo.setWorkOrderName(workOrderName);
|
||||
mo.setSelfWorkOrderId(selfWorkOrderId);
|
||||
mo.setSelfWorkOrderName(selfWorkOrderName);
|
||||
mo.setDatetimeStockIn(datetimeStockIn == null ? null : DateUtil.parse(datetimeStockIn).toTimestamp());
|
||||
mo.setItem(item);
|
||||
mo.setCheckResult(checkResult);
|
||||
mo.setDeleteFlag(Boolean.parseBoolean(deleteFlag));
|
||||
mo.setInvCode(invCode);
|
||||
mo.setGoodsAreaCode(goodsAreaCode);
|
||||
mo.setGoodsLocationCode(goodsLocationCode);
|
||||
mo.setMlsUpdateTime(mlsUpdateTime == null ? null : DateUtil.parse(mlsUpdateTime).toTimestamp());
|
||||
mo.setUpdateUserCode(updateUserCode);
|
||||
moService.update(mo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,32 +148,19 @@ public class MoServiceImpl implements MoService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public synchronized void scanMo(String mo) {
|
||||
String agv_on_off = "OFF";
|
||||
String code = "0";
|
||||
String message = "";
|
||||
agv_on_off = dictService.getDictDescription("agv_on_off") == null ? "OFF" : dictService.getDictDescription("agv_on_off").getDescription();
|
||||
//条码格式;12227000016951-qth1847-240411422924
|
||||
|
||||
MoDto moDto = this.findByLabelNo(mo);
|
||||
if (moDto == null) {
|
||||
throw new RuntimeException(mo + "系统无此标签!");
|
||||
String[] arr = mo.split("-");
|
||||
if (arr.length != 3) {
|
||||
throw new RuntimeException("条码格式错误!");
|
||||
}
|
||||
|
||||
if (!moDto.getLabelState().equals("PRINTED")) {
|
||||
throw new RuntimeException(mo + "标签已被接收(已接收状态)!");
|
||||
}
|
||||
String itemCode = arr[0];//物料编号
|
||||
String stockCode = arr[1];//容器编号
|
||||
String labelNo = arr[2];//标签号
|
||||
|
||||
OrderDto orderDto = orderService.findBydeliveryLineId(moDto.getDeliveryHeaderId());
|
||||
if (orderDto == null) {
|
||||
throw new RuntimeException(moDto.getDeliveryHeaderId() + "系统无此订单!");
|
||||
}
|
||||
|
||||
if (!orderDto.getDeliveryStatus().equals("lm_initial")) {
|
||||
throw new RuntimeException(orderDto.getBarcodeNumber() + "标签背后的送货单已取消(标签失效)!");
|
||||
}
|
||||
|
||||
String itemCode = "";//物料编号
|
||||
String stockCode = "";//容器编号
|
||||
Item item = itemService.existItem(itemCode);
|
||||
if (item == null) {
|
||||
throw new RuntimeException(itemCode + "系统无此物料!");
|
||||
|
|
@ -184,41 +171,77 @@ public class MoServiceImpl implements MoService {
|
|||
throw new RuntimeException(stockCode + "系统无此容器!");
|
||||
}
|
||||
|
||||
if (inventoryService.queryInventory(stock).size() > 0) {
|
||||
|
||||
if (stock.getStatus().equals(BaseStatus.USED)) {
|
||||
throw new RuntimeException(stockCode + "箱码已经有绑定关系!");
|
||||
}
|
||||
|
||||
|
||||
Point srcPoint = pointService.findByCode(null, null, null, "入库接驳口", null);
|
||||
if (srcPoint == null) {
|
||||
throw new RuntimeException("系统无入库接驳口!");
|
||||
}
|
||||
|
||||
Point endPoint = pointService.findByCode(null, BaseStatus.FREE, BaseStatus.STORAGE, "存储区", null);
|
||||
if (endPoint == null) {
|
||||
throw new RuntimeException("存储区没有空闲点位!");
|
||||
}
|
||||
|
||||
//生成AGV任务
|
||||
MoDto moDto = this.findByLabelNo(labelNo);
|
||||
if (moDto == null) {
|
||||
throw new RuntimeException(labelNo + "系统无此标签!");
|
||||
}
|
||||
|
||||
if (!moDto.getLabelState().equals("PRINTED")) {
|
||||
throw new RuntimeException(labelNo + "标签已被接收(已接收状态)!");
|
||||
}
|
||||
|
||||
if (taskService.findByLabelNo(labelNo).size() > 0) {
|
||||
throw new RuntimeException(labelNo + "此标签已入库!");
|
||||
}
|
||||
|
||||
OrderDto orderDto = orderService.findByDeliveryHeaderId(moDto.getDeliveryHeaderId());
|
||||
|
||||
if (orderDto == null) {
|
||||
throw new RuntimeException(moDto.getDeliveryHeaderId() + "系统无此订单!");
|
||||
}
|
||||
|
||||
if (!orderDto.getDeliveryStatus().equals("lm_initial")) {
|
||||
throw new RuntimeException(moDto.getLabelNo() + "标签背后的送货单" + orderDto.getBarcodeNumber() + "已取消(标签失效)!");
|
||||
}
|
||||
|
||||
// 生成AGV任务和入库任务
|
||||
createTasks(item, stock, srcPoint, endPoint, moDto.getLabelNo(), moDto, orderDto);
|
||||
|
||||
// 更新容器状态和目标点位状态
|
||||
updateStockAndEndPoint(stock);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void createTasks(Item item, Stock stock, Point srcPoint, Point endPoint, String propC1, MoDto moDto, OrderDto orderDto) {
|
||||
// 生成AGV任务
|
||||
AgvTask agvTask = new AgvTask(BizStatus.ASN, stock.getCode(), srcPoint.getCode(), endPoint.getCode(), BizStatus.OPEN, "RACK_MOVE_FULL");
|
||||
agvTaskService.create(agvTask);
|
||||
|
||||
//生成入库任务
|
||||
Date date = cn.hutool.core.date.DateUtil.date();
|
||||
String propC1 = DateUtil.format(date, "yyyyMMdd");
|
||||
AsnDetail asnDetail = asnDetailService.createAsnDetail(item, stock, srcPoint, propC1, null);
|
||||
asnDetail.setOrderQty(item.getExtendD1());
|
||||
// 生成入库任务
|
||||
|
||||
AsnDetail asnDetail = asnDetailService.createAsnDetail(item, stock, srcPoint, propC1, orderDto.getBarcodeNumber());
|
||||
asnDetail.setOrderQty(moDto.getQty());
|
||||
asnDetail.setPo(orderDto.getBarcodeNumber());
|
||||
asnDetailService.create(asnDetail);
|
||||
|
||||
//生成Itemkey
|
||||
ItemKey itemKey = itemKeyService.getItemKey(item, asnDetail.getPropC1(), asnDetail.getOrderNumber());
|
||||
ItemKey itemKey = itemKeyService.getItemKey(item, moDto.getLabelNo(), orderDto.getBarcodeNumber());
|
||||
|
||||
//生成收货记录
|
||||
Task task = new Task(item, itemKey, asnDetail.getOrderNumber(), BizStatus.ASN, asnDetail, null, null, null, stock, stock, srcPoint, endPoint, stock.getCode(), stock.getCode(), srcPoint.getCode(), endPoint.getCode(), null, BizStatus.OPEN, asnDetail.getOrderQty(), null, null, item.getDept(), agvTask);
|
||||
taskService.create(task);
|
||||
}
|
||||
|
||||
//容器改为占用,目标点位占用
|
||||
// 提取更新容器状态和目标点位状态的逻辑到单独方法
|
||||
private void updateStockAndEndPoint(Stock stock) {
|
||||
stock.setStatus(BaseStatus.USED);
|
||||
stockService.update(stock);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,10 +79,16 @@ public class OrderServiceImpl implements OrderService {
|
|||
|
||||
@Override
|
||||
@Transactional
|
||||
public OrderDto findBydeliveryLineId(Integer deliveryLineId) {
|
||||
Order order = orderRepository.findById(deliveryLineId).orElseGet(Order::new);
|
||||
ValidationUtil.isNull(order.getDeliveryHeaderId(), "Order", "deliveryLineId", deliveryLineId);
|
||||
return orderMapper.toDto(order);
|
||||
public OrderDto findByDeliveryHeaderId(Integer deliveryHeaderId) {
|
||||
String hql = "from Order o where o.deliveryHeaderId = :deliveryHeaderId";
|
||||
Query query = entityManager.createQuery(hql);
|
||||
query.setParameter("deliveryHeaderId", deliveryHeaderId);
|
||||
List<Order> orders = query.getResultList();
|
||||
if (orders.size() > 0) {
|
||||
return orderMapper.toDto(orders.get(0)); // 返回第一个订单
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -253,6 +253,15 @@ public class TaskServiceImpl implements TaskService {
|
|||
return l;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Task> findByLabelNo(String labelNo) {
|
||||
String hql = "from Task t where t.itemKey.propC1 = :labelNo";
|
||||
Query query = entityMapper.createQuery(hql);
|
||||
query.setParameter("labelNo", labelNo);
|
||||
List<Task> tasks = query.getResultList();
|
||||
return tasks;
|
||||
}
|
||||
|
||||
public List<Object[]> queryAreaMonth(String type) {
|
||||
List<Object[]> taskList=null;
|
||||
String hql = "";
|
||||
|
|
|
|||
|
|
@ -1,56 +0,0 @@
|
|||
package com.youchain.modules.jimu;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.modules.jmreport.desreport.render.handler.convert.ApiDataConvertAdapter;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Slf4j
|
||||
@Component("myApiDataConvertAdapter")
|
||||
public class MyApiDataConvertAdapter implements ApiDataConvertAdapter {
|
||||
/**
|
||||
* 返回list数据集
|
||||
* @param jsonObject 接口数据原始对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getData(JSONObject jsonObject) {
|
||||
log.error(jsonObject.toJSONString());
|
||||
if(jsonObject.containsKey("content")){
|
||||
return jsonObject.getString("content");
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回links
|
||||
* @param jsonObject 接口数据原始对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getLinks(JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回总页数
|
||||
* @param jsonObject 接口数据原始对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTotal(JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回总条数
|
||||
* @param jsonObject 接口数据原始对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getCount(JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -114,4 +114,4 @@ public class DeptController {
|
|||
deptService.delete(deptDtos);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.youchain;
|
||||
|
||||
import com.youchain.utils.S7ConnectorUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
|
@ -12,6 +13,8 @@ public class EladminSystemApplicationTests {
|
|||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
S7ConnectorUtils s7ConnectorUtils = new S7ConnectorUtils();
|
||||
s7ConnectorUtils.connect();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,89 +0,0 @@
|
|||
package com.youchain.service.mapstruct;
|
||||
|
||||
import com.youchain.domain.LocalStorage;
|
||||
import com.youchain.service.dto.LocalStorageDto;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2024-04-12T19:53:04+0800",
|
||||
comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_202 (Oracle Corporation)"
|
||||
)
|
||||
@Component
|
||||
public class LocalStorageMapperImpl implements LocalStorageMapper {
|
||||
|
||||
@Override
|
||||
public LocalStorage toEntity(LocalStorageDto dto) {
|
||||
if ( dto == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LocalStorage localStorage = new LocalStorage();
|
||||
|
||||
localStorage.setCreateBy( dto.getCreateBy() );
|
||||
localStorage.setUpdateBy( dto.getUpdateBy() );
|
||||
localStorage.setCreateTime( dto.getCreateTime() );
|
||||
localStorage.setUpdateTime( dto.getUpdateTime() );
|
||||
localStorage.setId( dto.getId() );
|
||||
localStorage.setRealName( dto.getRealName() );
|
||||
localStorage.setName( dto.getName() );
|
||||
localStorage.setSuffix( dto.getSuffix() );
|
||||
localStorage.setType( dto.getType() );
|
||||
localStorage.setSize( dto.getSize() );
|
||||
|
||||
return localStorage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LocalStorageDto toDto(LocalStorage entity) {
|
||||
if ( entity == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LocalStorageDto localStorageDto = new LocalStorageDto();
|
||||
|
||||
localStorageDto.setCreateBy( entity.getCreateBy() );
|
||||
localStorageDto.setUpdateBy( entity.getUpdateBy() );
|
||||
localStorageDto.setCreateTime( entity.getCreateTime() );
|
||||
localStorageDto.setUpdateTime( entity.getUpdateTime() );
|
||||
localStorageDto.setId( entity.getId() );
|
||||
localStorageDto.setRealName( entity.getRealName() );
|
||||
localStorageDto.setName( entity.getName() );
|
||||
localStorageDto.setSuffix( entity.getSuffix() );
|
||||
localStorageDto.setType( entity.getType() );
|
||||
localStorageDto.setSize( entity.getSize() );
|
||||
|
||||
return localStorageDto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LocalStorage> toEntity(List<LocalStorageDto> dtoList) {
|
||||
if ( dtoList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<LocalStorage> list = new ArrayList<LocalStorage>( dtoList.size() );
|
||||
for ( LocalStorageDto localStorageDto : dtoList ) {
|
||||
list.add( toEntity( localStorageDto ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LocalStorageDto> toDto(List<LocalStorage> entityList) {
|
||||
if ( entityList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<LocalStorageDto> list = new ArrayList<LocalStorageDto>( entityList.size() );
|
||||
for ( LocalStorage localStorage : entityList ) {
|
||||
list.add( toDto( localStorage ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue