add:新增pc工单暂停页面,添加物料筐数量
This commit is contained in:
@@ -35,6 +35,7 @@ public class MaterialbaseDto implements Serializable{
|
||||
private String base_unit_name;
|
||||
private String approve_fileno;
|
||||
private String print_no;
|
||||
private Integer limit_qty;
|
||||
/**
|
||||
* 物料分类
|
||||
*/
|
||||
|
||||
@@ -159,4 +159,8 @@ public class MdMeMaterialbase implements Serializable{
|
||||
*/
|
||||
@ApiModelProperty(value = "/**产品系列名称*/")
|
||||
private String product_series_name;
|
||||
/**
|
||||
* 每框数量
|
||||
*/
|
||||
private Integer limit_qty;
|
||||
}
|
||||
|
||||
@@ -351,7 +351,12 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService{
|
||||
form.put("workorder_id", workOrder.get("workorder_id"));
|
||||
form.put("workorder_code", workOrder.get("workorder_code"));
|
||||
form.put("qty", workOrder.getString("plan_qty"));
|
||||
form.put("outupperlimit_qty", device_code.getString("outupperlimit_qty"));
|
||||
Integer limit_qty = material.getInteger("limit_qty");
|
||||
form.put("outupperlimit_qty", material.get(limit_qty));
|
||||
if (limit_qty == null || limit_qty<1){
|
||||
form.put("outupperlimit_qty", device_code.getString("outupperlimit_qty"));
|
||||
|
||||
}
|
||||
form.put("material_id", workOrder.get("material_id"));
|
||||
form.put("material_name", material.get("material_name"));
|
||||
form.put("material_code", material.get("material_code"));
|
||||
|
||||
@@ -72,10 +72,10 @@ public class PdmProduceWorkorder implements Serializable{
|
||||
*/
|
||||
private String material_id;
|
||||
|
||||
/**
|
||||
* 物料单重
|
||||
*/
|
||||
private BigDecimal material_weight;
|
||||
// /**
|
||||
// * 物料单重
|
||||
// */
|
||||
// private BigDecimal material_weight;
|
||||
/**
|
||||
* 计划生产开始时间
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
material.material_code,
|
||||
material.material_spec,
|
||||
material.net_weight AS material_weight,
|
||||
device.outupperlimit_qty,
|
||||
IF(material.limit_qty=0,device.outupperlimit_qty,material.limit_qty) as outupperlimit_qty,
|
||||
pro.workprocedure_code,
|
||||
pro.workprocedure_name,
|
||||
users.person_name AS current_produce_person_name
|
||||
@@ -58,10 +58,10 @@
|
||||
and ShiftOrder.realproduceend_date <= #{query.end_time}
|
||||
</if>
|
||||
<if test="query.plan_start_time != null and query.plan_start_time != ''">
|
||||
and STR_TO_DATE(ShiftOrder.planproducestart_date, '%Y/%m/%d %H:%i:%s') >= #{query.plan_start_time}
|
||||
and ShiftOrder.planproducestart_date >= #{query.plan_start_time}
|
||||
</if>
|
||||
<if test="query.plan_end_time != null and query.plan_end_time != ''">
|
||||
and STR_TO_DATE(ShiftOrder.planproduceend_date, '%Y/%m/%d %H:%i:%s') <= #{query.plan_end_time}
|
||||
and ShiftOrder.planproducestart_date <= #{query.plan_end_time}
|
||||
</if>
|
||||
<if test="query.sale_id != null and query.sale_id != ''">
|
||||
and ShiftOrder.sale_id like '%${query.sale_id}%'
|
||||
|
||||
@@ -162,7 +162,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
Assert.notNull(form, "参数不能为空");
|
||||
PdmProduceWorkorder one = this.getOne(new QueryWrapper<PdmProduceWorkorder>().eq("workorder_id", form.getString("workorder_id")).in("workorder_status", "1", "2", "4"));
|
||||
if(one == null) {
|
||||
throw new BadRequestException("工单状态非生产状态下不允许修改");
|
||||
throw new BadRequestException("工单生产状态下不允许修改");
|
||||
}
|
||||
PdmProduceWorkorder entity = form.toJavaObject(PdmProduceWorkorder.class);
|
||||
entity.setDown_time(DateUtil.now());
|
||||
@@ -304,6 +304,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
return one.getMacoperate_id();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> queryExistWorkOrder() {
|
||||
return pdmProduceWorkorderMapper.queryExistWorkOrder();
|
||||
@@ -425,7 +426,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if(j == 7) {
|
||||
//单重
|
||||
BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf(col) * 1000);
|
||||
workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
||||
// workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
||||
}
|
||||
if(j == 8) {
|
||||
persons.add(col);
|
||||
@@ -552,7 +553,7 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
if(j == 9) {
|
||||
//单重
|
||||
BigDecimal bigDecimal = BigDecimal.valueOf(Double.valueOf(col.equals("#N/A") ? "0.05" : col) * 1000);
|
||||
workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
||||
// workorder.setMaterial_weight(bigDecimal.setScale(3, RoundingMode.HALF_UP));
|
||||
}
|
||||
if(j == 10) {
|
||||
persons.add(col);
|
||||
@@ -744,7 +745,11 @@ public class IPdmProduceWorkorderServiceImpl extends ServiceImpl<PdmProduceWorko
|
||||
form.put("workorder_id", workOrder.getWorkorder_id());
|
||||
form.put("workorder_code", workOrder.getWorkorder_code());
|
||||
form.put("qty", workOrder.getPlan_qty());
|
||||
form.put("outupperlimit_qty", device.getOutupperlimit_qty());
|
||||
Integer limit_qty = material.getLimit_qty();
|
||||
form.put("outupperlimit_qty", limit_qty);
|
||||
if (limit_qty == null || limit_qty<1){
|
||||
form.put("outupperlimit_qty", device.getOutupperlimit_qty());
|
||||
}
|
||||
form.put("material_id", workOrder.getMaterial_id());
|
||||
form.put("material_name", material.getMaterial_name());
|
||||
form.put("material_code", material.getMaterial_code());
|
||||
|
||||
@@ -8,7 +8,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,6 +18,7 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Order(100)
|
||||
@ConditionalOnProperty(name = "spring.profiles.active", havingValue = "prod")
|
||||
public class JobRunner implements ApplicationRunner {
|
||||
private static final Logger log = LoggerFactory.getLogger(JobRunner.class);
|
||||
private final ISysQuartzJobService quartzJobService;
|
||||
|
||||
Reference in New Issue
Block a user