Commit 2977d535 authored by 李驰骋's avatar 李驰骋

Merge remote-tracking branch 'origin/master'

parents 03ad0796 c83c2d44
......@@ -214,4 +214,5 @@ qc.error.error5=\u5F53\u524D\u5DE5\u5355\u751F\u4EA7\u7684\u4EA7\u54C1\u672A\u91
qc.error.error6=\u68C0\u6D4B\u9879\u7F16\u53F7\u5DF2\u5B58\u5728
qc.error.error7=\u68C0\u6D4B\u9879\u540D\u79F0\u5DF2\u5B58\u5728
#system.printer
system.printer.error.repeat.bind=\u8BE5\u6253\u5370\u673A\u5DF2\u7ED1\u5B9A\u4E86
\ No newline at end of file
system.printer.error.repeat.bind=\u8BE5\u6253\u5370\u673A\u5DF2\u7ED1\u5B9A\u4E86
rule.currentSerial.error= \u8be5\u4ea7\u54c1\u5e8f\u5217\u53f7\u5269\u4f59\u003a{0}\u4e0d\u6ee1\u8db3\u5de5\u5355\u6570\u91cf\u003a{1}
\ No newline at end of file
......@@ -211,4 +211,5 @@ qc.error.error5=The product produced by the current work order is not configured
qc.error.error6=Inspection item number already exists.
qc.error.error7=Inspection item name already exists.
#system.printer
system.printer.error.repeat.bind=This printer has been bound.
\ No newline at end of file
system.printer.error.repeat.bind=This printer has been bound.
rule.currentSerial.error= The remaining quantity of the product serial number is insufficient :{0} , workorder quantity : {1}
\ No newline at end of file
......@@ -216,4 +216,5 @@ qc.error.error7=\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E
system.printer.error.repeat.bind=\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E16\u0E39\u0E01\u0E1C\u0E39\u0E01\u0E44\u0E27\u0E49
md.workStation.error.not.productionSolutionCode = \u0050\u0072\u006f\u0064\u0075\u0063\u0074\u0069\u006f\u006e\u0053\u006f\u006c\u0075\u0074\u0069\u006f\u006e\u0043\u006f\u0064\u0065\u0020\u0e44\u0e21\u0e48\u0e44\u0e14\u0e49\u0e01\u0e23\u0e2d\u0e01
md.workStation.error.productionSolutionCode.unique = \u0050\u0072\u006f\u0064\u0075\u0063\u0074\u0069\u006f\u006e\u0053\u006f\u006c\u0075\u0074\u0069\u006f\u006e\u0043\u006f\u0064\u0065\u003a\u0020\u0e44\u0e21\u0e48\u0e40\u0e09\u0e1e\u0e32\u0e30
md.workStation.error.productionSolutionCode.size = \u0050\u0072\u006f\u0064\u0075\u0063\u0074\u0069\u006f\u006e\u0053\u006f\u006c\u0075\u0074\u0069\u006f\u006e\u0043\u006f\u0064\u0065\u003a\u0020\u0e21\u0e35\u0e04\u0e48\u0e32\u0e21\u0e32\u0e01\u0e02\u0e36\u0e49\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27
\ No newline at end of file
md.workStation.error.productionSolutionCode.size = \u0050\u0072\u006f\u0064\u0075\u0063\u0074\u0069\u006f\u006e\u0053\u006f\u006c\u0075\u0074\u0069\u006f\u006e\u0043\u006f\u0064\u0065\u003a\u0020\u0e21\u0e35\u0e04\u0e48\u0e32\u0e21\u0e32\u0e01\u0e02\u0e36\u0e49\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27
rule.currentSerial.error= \u0e2b\u0e21\u0e32\u0e22\u0e40\u0e25\u0e02\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c\u0020\u0e40\u0e2b\u0e25\u0e37\u0e2d {0},\u0e44\u0e21\u0e48\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e1b\u0e15\u0e32\u0e21\u0e08\u0e33\u0e19\u0e27\u0e19\u0e43\u0e1a\u0e2a\u0e31\u0e48\u0e07\u0e07\u0e32\u0e19{1}
\ No newline at end of file
......@@ -214,4 +214,5 @@ qc.error.error5=\u5F53\u524D\u5DE5\u5355\u751F\u4EA7\u7684\u4EA7\u54C1\u672A\u91
qc.error.error6=\u68C0\u6D4B\u9879\u7F16\u53F7\u5DF2\u5B58\u5728
qc.error.error7=\u68C0\u6D4B\u9879\u540D\u79F0\u5DF2\u5B58\u5728
#system.printer
system.printer.error.repeat.bind=\u8BE5\u6253\u5370\u673A\u5DF2\u7ED1\u5B9A\u4E86
\ No newline at end of file
system.printer.error.repeat.bind=\u8BE5\u6253\u5370\u673A\u5DF2\u7ED1\u5B9A\u4E86
rule.currentSerial.error= \u8be5\u4ea7\u54c1\u5e8f\u5217\u53f7\u5269\u4f59\u003a{0}\u4e0d\u6ee1\u8db3\u5de5\u5355\u6570\u91cf\u003a{1}
\ No newline at end of file
......@@ -35,30 +35,30 @@ public class ProductQrcodeBuild implements ScheduleBusiProcess{
if(rule ==null){
return;
}
//wzc修改 有客户优先按照产品+客户匹配序列号规则绑定的最新打印模板,如果没有匹配到 按照产品匹配序列号规则绑定的最新打印模板(客户字段为空的)
ProProductQrcodeRuleDto proProductQrcodeRuleDto= null;
List<ProProductQrcodeRuleDto> list = null;
if(StringUtils.isNotEmpty(workorder.getClientCode())){
QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
query.eq("m.item_id", workorder.getProductId());
query.eq( "m.client_code", workorder.getClientCode());
query.orderByDesc("m.rule_id");
list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
}else{
QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
query.eq("m.item_id", workorder.getProductId());
query.isNull( "m.client_code");
query.orderByDesc("m.rule_id");
list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
}
if(list != null && list.size() > 0){
proProductQrcodeRuleDto = list.get(0);
}
if (proProductQrcodeRuleDto == null || StringUtils.isEmpty(proProductQrcodeRuleDto.getTemplateName())){
//后续再看是否需要报错
ExceptionUtil.checkTrueThrowException(true,
"未能匹配到打印模板,请先到产品二维码规则维护");
}
// //wzc修改 有客户优先按照产品+客户匹配序列号规则绑定的最新打印模板,如果没有匹配到 按照产品匹配序列号规则绑定的最新打印模板(客户字段为空的)
// ProProductQrcodeRuleDto proProductQrcodeRuleDto= null;
// List<ProProductQrcodeRuleDto> list = null;
// if(StringUtils.isNotEmpty(workorder.getClientCode())){
// QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
// query.eq("m.item_id", workorder.getProductId());
// query.eq( "m.client_code", workorder.getClientCode());
// query.orderByDesc("m.rule_id");
// list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
// }else{
// QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
// query.eq("m.item_id", workorder.getProductId());
// query.isNull( "m.client_code");
// query.orderByDesc("m.rule_id");
// list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
// }
// if(list != null && list.size() > 0){
// proProductQrcodeRuleDto = list.get(0);
// }
// if (proProductQrcodeRuleDto == null || StringUtils.isEmpty(proProductQrcodeRuleDto.getTemplateName())){
// //后续再看是否需要报错
//// ExceptionUtil.checkTrueThrowException(true,
//// "未能匹配到打印模板,请先到产品二维码规则维护");
// }
List<String> qrcodes = productQrcodeRuleService.buildQrcode(rule, job.getQuantity().intValue());
for(String qrcode : qrcodes){
ProProductQrcodeRecordCreate create = new ProProductQrcodeRecordCreate();
......@@ -66,10 +66,10 @@ public class ProductQrcodeBuild implements ScheduleBusiProcess{
create.initByWorkorder(workorder);
create.setItemDesc(rule.getItemDesc());
//产品序列打印记录增加模板相关内容
create.setTemplateId(proProductQrcodeRuleDto != null ? proProductQrcodeRuleDto.getTemplateId() : null);
create.setTemplateCode(proProductQrcodeRuleDto != null ? proProductQrcodeRuleDto.getTemplateCode() : null);
create.setTemplateName(proProductQrcodeRuleDto != null ? proProductQrcodeRuleDto.getTemplateName() : null);
create.setTemplateType(proProductQrcodeRuleDto != null ? proProductQrcodeRuleDto.getTemplateType() : null);
create.setTemplateId(rule != null ? rule.getTemplateId() : null);
create.setTemplateCode(rule != null ? rule.getTemplateCode() : null);
create.setTemplateName(rule != null ? rule.getTemplateName() : null);
create.setTemplateType(rule != null ? rule.getTemplateType() : null);
productQrcodeRecordService.insertProProductQrcodeRecord(create);
}
});
......
......@@ -3,8 +3,10 @@ package com.ximai.mes.pro.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ximai.common.utils.MessageUtils;
import com.ximai.common.utils.data.DateUtils;
import com.ximai.common.utils.SecurityUtils;
import com.ximai.common.utils.data.ExceptionUtil;
import com.ximai.common.utils.data.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -77,6 +79,7 @@ public class ProProductQrcodeRuleServiceImpl implements IProProductQrcodeRuleSer
QueryWrapper<ProProductQrcodeRule> proProductQrcodeRuleQuery = new QueryWrapper<>();
proProductQrcodeRuleQuery.eq("item_id", itemId);
proProductQrcodeRuleQuery.eq(StringUtils.isNotEmpty(clientCode),"client_code", clientCode);
proProductQrcodeRuleQuery.isNull(StringUtils.isEmpty(clientCode),"client_code");
proProductQrcodeRuleQuery.orderByDesc("create_time");
List<ProProductQrcodeRule> list = this.selectProProductQrcodeRuleList(proProductQrcodeRuleQuery);
if(list.size()>0){
......@@ -152,6 +155,15 @@ public class ProProductQrcodeRuleServiceImpl implements IProProductQrcodeRuleSer
@Override
public List<String> buildQrcode(ProProductQrcodeRule rule, Integer quantity) {
if(rule.getCurrentSerial() != null && rule.getSerialLen() != null && rule.getSerialLen() > 0){
StringBuilder maxCurrentSerialString = new StringBuilder();
for(int i=0; i < rule.getSerialLen(); i++){
maxCurrentSerialString.append(9);
}
double maxCurrentSerial = new Double(maxCurrentSerialString.toString());
Integer size = rule.getCurrentSerial() + quantity;
ExceptionUtil.checkTrueThrowException(maxCurrentSerial < size, MessageUtils.message("rule.currentSerial.error",maxCurrentSerial - rule.getCurrentSerial(),quantity));
}
List<String> rst = new ArrayList<>();
for(int i=0;i<quantity;i++){
String temp = rule.buildQrcode();
......
......@@ -270,7 +270,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
} else {
Long workorderId = proWorkorderVo.getWorkorderId();
ProWorkorderVo workorder = proWorkorderService.selectProWorkorderByWorkorderId(workorderId);
ExceptionUtil.checkTrueThrowException(workorder.getStatus().equals(WorkorderStatusEnum.PUBLISHED.getValue()), MessageUtils.message("pro.workOrder.status.published.error"));
ExceptionUtil.checkTrueThrowException(!workorder.getStatus().equals(WorkorderStatusEnum.PUBLISHED.getValue()), MessageUtils.message("pro.workOrder.status.published.error"));
int ret = proWorkorderService.updateProWorkorderWithBomAndProcess(proWorkorderVo);
......
package com.ximai.mes.report.controller;
import com.ximai.common.annotation.Log;
import com.ximai.common.core.controller.BaseController;
import com.ximai.common.core.domain.AjaxResult;
import com.ximai.common.enums.BusinessType;
import com.ximai.mes.report.request.FeedbackRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@Api("生产报工")
@RestController
@RequestMapping("/report/pro/feedback")
public class FeedbackController extends BaseController {
/**
* 新增生产报工记录
*/
@ApiOperation("新增报工单接口")
@PreAuthorize("@ss.hasPermi('mes:pro:feedback:add')")
@Log(title = "生产报工记录", businessType = BusinessType.QUERY)
@GetMapping
public AjaxResult add(@RequestBody FeedbackRequest feedbackRequest) {
return null;
}
}
package com.ximai.mes.report.request;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ximai.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
public class FeedbackRequest {
// 工单类型(下拉选择工单类型)
// 项目号(工单项目号)
// 订单号(工单订单号)
// 生产工单(生产工单号)
// 任务号(工序任务号)
// 产品编码(产品编码)
// 产品名称(点击放大镜单选产品信息,也可直接输入名称执行搜索)
// 工序(点击放大镜单选工序,也可直接输入名称执行搜索)
// 车间(点击放大镜单选车间,也可直接输入名称执行搜索)
// 工作中心(点击放大镜单选工作中心,也可直接输入名称执行搜索)
// 工作单元(点击放大镜单选工作单元,也可直接输入名称执行搜索)
// 报工人员(点击放大镜单选报工人员,也可直接输入名称执行搜索)
// 报工时间(选择开始截至时间)
/**
* 工单类型
*/
@ApiModelProperty(name = "工单类型")
private String workorderType;
@ApiModelProperty("客户项目号")
private String customerProjectNo;
@ApiModelProperty("订单单号")
private String orderCode;
/**
* 工单编码
*/
@ApiModelProperty(name = "工单编码")
private String workorderCode;
/**
* 任务编号
*/
@ApiModelProperty(name = "工序任务号")
private String taskCode;
/**
* 产品编号
*/
@ApiModelProperty(name = "产品编号")
private String productCode;
/**
* 产品名称
*/
@ApiModelProperty(name = "产品名称")
private String productName;
/**
* 工序ID
*/
@ApiModelProperty(name = "工序ID")
private Long processId;
/**
* 工序编码
*/
@ApiModelProperty(name = "工序编码")
private String processCode;
/**
* 车间ID
*/
@Excel(name = "车间ID")
@ApiModelProperty("车间ID")
private Long workshopId;
@ApiModelProperty("车间名称")
private String workshopName;
/**
* 工作中心ID
*/
@ApiModelProperty(name = "工作中心ID")
private Long workstationId;
/**
* 工作中心名称
*/
@ApiModelProperty(name = "工作中心名称")
private String workstationName;
/**
*
*/
@ApiModelProperty("工作单元ID")
private Long workunitId;
@ApiModelProperty("作业单元名称")
private String workunitName;
@ApiModelProperty("报工人员")
private String userName;
@ApiModelProperty("报工开始")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startDate;
@ApiModelProperty("报工结束")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endDate;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment