湿料计划管理(查询详情list)

highway
wws 1 year ago
parent a9f3792c77
commit 5752973f8c

@ -29,6 +29,17 @@ public class ProWetMaterialPlanController extends BaseController {
@Autowired
private IProWetMaterialPlanService proWetMaterialPlanService;
/**
* id湿list
*
* @param id
* @return
*/
@GetMapping("/getPlanDetail")
public AjaxResult getWetMaterialPlanDetailListById(String id) {
return proWetMaterialPlanService.getWetMaterialPlanDetailListById(id);
}
/**
* 湿
*

@ -89,132 +89,172 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
@Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date planTime;
public Date getPlanTime() {
return planTime;
}
// 工单编码
private String workorderCode;
public void setPlanTime(Date planTime) {
this.planTime = planTime;
// 工单日期
@JsonFormat(pattern = "yyyy-MM-dd")
private Date productDate;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
public String getFactoryCode() {
return factoryCode;
public String getWetMaterialPlanId() {
return wetMaterialPlanId;
}
public void setWetMaterialPlanId(String wetMaterialPlanId) {
this.wetMaterialPlanId = wetMaterialPlanId;
}
public String getWetMaterialPlanId() {
return wetMaterialPlanId;
public String getWorkorderId() {
return workorderId;
}
public void setWorkorderId(String workorderId) {
this.workorderId = workorderId;
}
public String getWorkorderId() {
return workorderId;
public String getAtrr1() {
return atrr1;
}
public void setAtrr1(String atrr1) {
this.atrr1 = atrr1;
}
public String getAtrr1() {
return atrr1;
public String getAtrr2() {
return atrr2;
}
public void setAtrr2(String atrr2) {
this.atrr2 = atrr2;
}
public String getAtrr2() {
return atrr2;
public String getAtrr3() {
return atrr3;
}
public void setAtrr3(String atrr3) {
this.atrr3 = atrr3;
}
public String getAtrr3() {
return atrr3;
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
public String getBucketId() {
return bucketId;
}
public void setBucketId(String bucketId) {
this.bucketId = bucketId;
}
public String getBucketId() {
return bucketId;
public String getBucketCode() {
return bucketCode;
}
public void setBucketCode(String bucketCode) {
this.bucketCode = bucketCode;
}
public String getBucketCode() {
return bucketCode;
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialCode() {
return materialCode;
public String getMaterialId() {
return materialId;
}
public void setMaterialId(String materialId) {
this.materialId = materialId;
}
public String getMaterialId() {
return materialId;
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialName() {
return materialName;
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductName() {
return productName;
public Long getShiftId() {
return shiftId;
}
public void setShiftId(Long shiftId) {
this.shiftId = shiftId;
}
public Long getShiftId() {
return shiftId;
public String getShiftCode() {
return shiftCode;
}
public void setShiftCode(String shiftCode) {
this.shiftCode = shiftCode;
}
public String getShiftCode() {
return shiftCode;
public String getShiftDesc() {
return shiftDesc;
}
public void setShiftDesc(String shiftDesc) {
this.shiftDesc = shiftDesc;
}
public String getShiftDesc() {
return shiftDesc;
public Date getPlanTime() {
return planTime;
}
public void setPlanTime(Date planTime) {
this.planTime = planTime;
}
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public Date getProductDate() {
return productDate;
}
public void setProductDate(Date productDate) {
this.productDate = productDate;
}
@Override
@ -242,6 +282,8 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
.append("shiftCode", getShiftCode())
.append("shiftDesc", getShiftDesc())
.append("planTime",getPlanTime())
.append("workorderCode",getWorkorderCode())
.append("productDate",getProductDate())
.toString();
}
}

@ -59,4 +59,12 @@ public interface ProWetMaterialPlanDetailMapper {
* @return
*/
public int deleteProWetMaterialPlanDetailByIds(String[] ids);
/**
* idlist
*
* @param id
* @return
*/
List<ProWetMaterialPlanDetail> selectProWetMaterialPlanDetailListById(String id);
}

@ -199,7 +199,7 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
// 将湿料计划详情更新至数据库
proWetMaterialPlanDetailMapper.insertProWetMaterialPlanDetail(createProWetMaterialPlanDetail(proOrderWorkorderList.get(i), proWetMaterialPlan.getId()));
}
}else {
} else {
// 循环创建湿料计划详情
for (int i = 0; i < proOrderWorkorderList.size(); i++) {
// 将湿料计划详情更新至数据库
@ -209,6 +209,23 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
return success();
}
/**
* id湿list
*
* @param id
* @return
*/
@Override
@DS("#header.poolName")
public AjaxResult getWetMaterialPlanDetailListById(String id) {
List<ProWetMaterialPlanDetail> detailList = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailListById(id);
// 获取班次名称
for (int i = 0;i < detailList.size();i++){
detailList.get(i).setShiftDesc(proWetMaterialPlanMapper.selectShiftById(String.valueOf(detailList.get(i).getShiftId())));
}
return success(detailList);
}
/**
* 湿
*
@ -253,6 +270,8 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
ProWetMaterialPlanDetail detail = new ProWetMaterialPlanDetail();
// 设置主键id
detail.setId(IdUtils.fastSimpleUUID());
// 产品名称
detail.setProductName(workorder.getProductName());
// TODO 计划工厂编码
//detail.setFactoryCode();
// 主计划id
@ -279,6 +298,14 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
detail.setShiftDesc(workorder.getShiftDesc());
// 湿料计划时间
detail.setPlanTime(workorder.getPlanTime());
// 创建者
detail.setCreateBy(SecurityContextHolder.getUserName());
// 创建时间
detail.setCreateTime(DateUtils.getNowDate());
// 更新者
detail.setUpdateBy(SecurityContextHolder.getUserName());
// 更新时间
detail.setUpdateTime(DateUtils.getNowDate());
return detail;
}

@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectAllRoute" resultMap="ProRouteResult">
select route_code, route_name
from pro_route
where enable_flag = 'Y'
</select>
<insert id="insertProRoute" parameterType="ProRoute" useGeneratedKeys="true" keyProperty="routeId">

@ -27,6 +27,9 @@
<result property="shiftCode" column="shift_code" />
<result property="shiftDesc" column="shift_desc" />
<result property="planTime" column="plan_time" />
<result property="productName" column="product_name" />
<result property="productDate" column="product_date" />
<result property="workorderCode" column="workorder_code" />
</resultMap>
<sql id="selectProWetMaterialPlanDetailVo">
@ -61,6 +64,13 @@
where id = #{id}
</select>
<select id="selectProWetMaterialPlanDetailListById" parameterType="String" resultMap="ProWetMaterialPlanDetailResult">
select w.*,w.workorder_code,w.product_name,w.product_date
from pro_wet_material_plan_detail p join pro_order_workorder w
on w.workorder_id = p.workorder_id
where p.wet_material_plan_id = #{id}
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
insert into pro_wet_material_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save