add:刻字机叫料功能
This commit is contained in:
@@ -23,11 +23,11 @@ spring:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes_test}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.46.5}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hl_one_mes}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:942464Yy}
|
||||
password: ${DB_PWD:123456}
|
||||
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
|
||||
@@ -1,24 +1,27 @@
|
||||
import com.alibaba.fastjson.JSONArray
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import org.nl.wms.product_manage.service.device.dao.PdmBiDevice
|
||||
|
||||
def getPoints(JSONArray points,Map<String, List<Object>> materialCollent,Double inupperlimitQty){
|
||||
def getPoints(List<PdmBiDevice> devices, Map<String, List<PdmBiDevice>> materialCollent, Double inupperlimitQty){
|
||||
|
||||
def list = new ArrayList<>();
|
||||
JSONObject point = points.getJSONObject(0)
|
||||
String materialId = point.getString("material_id");
|
||||
List<Object> collect = materialCollent.get(materialId);
|
||||
collect.sort(Comparator.comparingDouble({ item -> ((JSONObject) item).getDouble("vehicle_qty") }).reversed());
|
||||
PdmBiDevice device = devices.get(0)
|
||||
String materialId = device.getMaterial_id();
|
||||
List<PdmBiDevice> collect = materialCollent.get(materialId);
|
||||
Double qty = 0.0;
|
||||
for (Object o1 : collect) {
|
||||
def list = new ArrayList<>();
|
||||
for (PdmBiDevice o1 : collect) {
|
||||
if (qty>inupperlimitQty){
|
||||
return list;
|
||||
}
|
||||
def item = new JSONObject()
|
||||
item.put("point_code",((JSONObject) o1).getString("point_code"))
|
||||
item.put("qty",((JSONObject) o1).getDouble("vehicle_qty"));
|
||||
item.put("device_code",o1.getDevice_code())
|
||||
item.put("qty",o1.getDeviceinstor_qty());
|
||||
item.put("weight",o1.getDeviceinstor_weight().doubleValue());
|
||||
item.put("material_id",materialId);
|
||||
list.add(item);
|
||||
qty = qty+((JSONObject) o1).getDouble("vehicle_qty");
|
||||
if (o1.getIs_artificial()){
|
||||
return list;
|
||||
}
|
||||
qty = qty+o1.getDeviceinstor_qty();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -23,4 +23,12 @@
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_STLS" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
<process id="XYXL" name="旋压下料">
|
||||
<start id="start" name="Starter" targetRef="A1_XYXL"></start>
|
||||
<flow id="A1_XYXL" name="无屑下料工序" has="1" sourceRef="starter" targetRef="A1_SKQX">
|
||||
<param id="cacheLine" value="A1_HCX_03"/>
|
||||
</flow>
|
||||
<flow id="A1_SKQX" name="深坑清洗" sourceRef="A1_XYXL" targetRef="end"></flow>
|
||||
<end id="end" name="Junior Reject End" sourceRef="A1_SKQX"></end>
|
||||
</process>
|
||||
</definitions>
|
||||
|
||||
Reference in New Issue
Block a user