Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -317,6 +317,9 @@ public class PdmBiSubpackagerelation extends Model<PdmBiSubpackagerelation> {
|
|||||||
/** 物料类型 */
|
/** 物料类型 */
|
||||||
private String material_type;
|
private String material_type;
|
||||||
|
|
||||||
|
/** 是否放行 */
|
||||||
|
private String is_pass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 纸管规格
|
* 纸管规格
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1005,6 +1005,9 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
// 如果是没货
|
// 如果是没货
|
||||||
throw new BadRequestException("点位:" + point.getPoint_code() + "检测空气胀轴,请确保下卷任务是否完毕后触发!");
|
throw new BadRequestException("点位:" + point.getPoint_code() + "检测空气胀轴,请确保下卷任务是否完毕后触发!");
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isEmpty(point.getQzz_no1()) || ObjectUtil.isEmpty(point.getQzz_no2())) {
|
||||||
|
throw new BadRequestException("点位:" + point.getPoint_code() + " 的气胀轴编码为空!");
|
||||||
|
}
|
||||||
List<BstIvtCutpointivt> areaEmptyNotTaskPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1",
|
List<BstIvtCutpointivt> areaEmptyNotTaskPoint = bcutpointivtService.getAreaNotTaskPointByStatus("1",
|
||||||
"1", "0", "2");
|
"1", "0", "2");
|
||||||
if (areaEmptyNotTaskPoint.size() == 0) {
|
if (areaEmptyNotTaskPoint.size() == 0) {
|
||||||
@@ -1197,6 +1200,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject toShaftBinding(JSONObject param) {
|
public JSONObject toShaftBinding(JSONObject param) {
|
||||||
|
log.info("气胀轴绑定:{}", param);
|
||||||
// param : container_name, point_code
|
// param : container_name, point_code
|
||||||
String containerName = param.getString("container_name");
|
String containerName = param.getString("container_name");
|
||||||
String pointCode1 = param.getString("point_code");
|
String pointCode1 = param.getString("point_code");
|
||||||
@@ -1280,6 +1284,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject bindSlitterSubVolumeInfo(JSONObject param) {
|
public JSONObject bindSlitterSubVolumeInfo(JSONObject param) {
|
||||||
|
log.info("绑定分切机上的子卷信息:{}", param);
|
||||||
// param: point_code, container_name(逗号隔开)
|
// param: point_code, container_name(逗号隔开)
|
||||||
// 子卷生成气胀轴编码,设置05状态
|
// 子卷生成气胀轴编码,设置05状态
|
||||||
String containerName = param.getString("container_name");
|
String containerName = param.getString("container_name");
|
||||||
@@ -1324,6 +1329,7 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject unBindSlitterSubVolumeInfo(JSONObject param) {
|
public JSONObject unBindSlitterSubVolumeInfo(JSONObject param) {
|
||||||
|
log.info("解绑分切机上的子卷信息:{}", param);
|
||||||
String pointCode1 = param.getString("point_code");
|
String pointCode1 = param.getString("point_code");
|
||||||
StIvtCutpointivt slitterDevice = cutpointivtService.getPintByUpOrDownCode(pointCode1, false);
|
StIvtCutpointivt slitterDevice = cutpointivtService.getPintByUpOrDownCode(pointCode1, false);
|
||||||
if (pointCode1.equals(slitterDevice.getUp_point_code())) {
|
if (pointCode1.equals(slitterDevice.getUp_point_code())) {
|
||||||
|
|||||||
@@ -253,11 +253,20 @@
|
|||||||
sub.thickness_request,
|
sub.thickness_request,
|
||||||
sub.box_weight,
|
sub.box_weight,
|
||||||
cust.sales_owner,
|
cust.sales_owner,
|
||||||
CASE
|
CASE
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '60'
|
WHEN SUBSTRING( sub.container_name, 1, 1 ) = 'B' THEN
|
||||||
AND DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '2'
|
CASE
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '150' AND DATEDIFF( NOW(), sub.date_of_production ) <= '180' THEN '2'
|
||||||
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '180' THEN '1'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '180' THEN '3'
|
||||||
|
END
|
||||||
|
|
||||||
|
WHEN SUBSTRING( sub.container_name, 1, 1 ) <> 'B' THEN
|
||||||
|
CASE
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '60' AND DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '2'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) <= '90' THEN '1'
|
||||||
|
WHEN DATEDIFF( NOW(), sub.date_of_production ) > '90' THEN '3'
|
||||||
|
END
|
||||||
END AS sub_type,
|
END AS sub_type,
|
||||||
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age,
|
DATEDIFF( NOW(), ivt.instorage_time ) AS stock_age,
|
||||||
sub.joint_type,
|
sub.joint_type,
|
||||||
|
|||||||
@@ -8,9 +8,14 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||||
|
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
@@ -223,9 +228,17 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||||
wmsToAcsService.action(rows);
|
wmsToAcsService.action(rows);
|
||||||
|
|
||||||
// 将木箱重量告知飞书
|
//判断is_pass是否为空,如果为空则通知飞书,不为空判断:为0则不允许通过,为1则允许
|
||||||
notifyMes(sub_jo);
|
if (ObjectUtil.isEmpty(sub_jo.getString("is_pass")) || sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否")) ) {
|
||||||
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木称重重量:" + real_weight);
|
// 通知飞书
|
||||||
|
notifyMes(sub_jo);
|
||||||
|
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木称重重量:" + real_weight + ",已通知飞书处理!");
|
||||||
|
} else {
|
||||||
|
if (sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
|
throw new BadRequestException("请等待放行!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断是该包装计划是否存在长宽高
|
//判断是该包装计划是否存在长宽高
|
||||||
@@ -663,7 +676,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
}
|
}
|
||||||
param.put("UserList", UserList);
|
param.put("UserList", UserList);
|
||||||
// 标签code
|
// 标签code
|
||||||
param.put("Code", "ctp_AA65DNXr3svo");
|
param.put("Code", "AAq00SOHd1wrK");
|
||||||
|
|
||||||
// 组织标签内容
|
// 组织标签内容
|
||||||
JSONObject content = new JSONObject();
|
JSONObject content = new JSONObject();
|
||||||
@@ -671,10 +684,11 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
double real_weight = NumberUtil.round(sub_jo.getDoubleValue("real_weight"), 2).doubleValue();
|
double real_weight = NumberUtil.round(sub_jo.getDoubleValue("real_weight"), 2).doubleValue();
|
||||||
|
|
||||||
content.put("title", "【LMS通知】木箱超重警告");
|
content.put("title", "【LMS通知】木箱超重警告");
|
||||||
content.put("Message", "木箱号:" + sub_jo.getString("package_box_sn") + ",系统木箱重量:" + box_weight + "KG,实际木箱重量:" + real_weight + "KG");
|
content.put("Message", "木箱超重!系统木箱重量:" + box_weight + "KG,实际木箱重量:" + real_weight + "KG");
|
||||||
|
content.put("MXNum", sub_jo.getString("package_box_sn"));
|
||||||
param.put("card", content);
|
param.put("card", content);
|
||||||
|
|
||||||
// 调用mes接口
|
// 调用mes接口
|
||||||
lmsToMesService.proudDayData(param);
|
lmsToMesService.sendSalesIvtMsgParam(param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user