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

highway
wws 1 year ago
parent a9f3792c77
commit 5752973f8c

@ -29,6 +29,17 @@ public class ProWetMaterialPlanController extends BaseController {
@Autowired @Autowired
private IProWetMaterialPlanService proWetMaterialPlanService; 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") @Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date planTime; 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) { public void setId(String id) {
this.id = id; this.id = id;
} }
public String getId() { public String getFactoryCode() {
return id; return factoryCode;
} }
public void setFactoryCode(String factoryCode) { public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode; this.factoryCode = factoryCode;
} }
public String getFactoryCode() { public String getWetMaterialPlanId() {
return factoryCode; return wetMaterialPlanId;
} }
public void setWetMaterialPlanId(String wetMaterialPlanId) { public void setWetMaterialPlanId(String wetMaterialPlanId) {
this.wetMaterialPlanId = wetMaterialPlanId; this.wetMaterialPlanId = wetMaterialPlanId;
} }
public String getWetMaterialPlanId() { public String getWorkorderId() {
return wetMaterialPlanId; return workorderId;
} }
public void setWorkorderId(String workorderId) { public void setWorkorderId(String workorderId) {
this.workorderId = workorderId; this.workorderId = workorderId;
} }
public String getWorkorderId() { public String getAtrr1() {
return workorderId; return atrr1;
} }
public void setAtrr1(String atrr1) { public void setAtrr1(String atrr1) {
this.atrr1 = atrr1; this.atrr1 = atrr1;
} }
public String getAtrr1() { public String getAtrr2() {
return atrr1; return atrr2;
} }
public void setAtrr2(String atrr2) { public void setAtrr2(String atrr2) {
this.atrr2 = atrr2; this.atrr2 = atrr2;
} }
public String getAtrr2() { public String getAtrr3() {
return atrr2; return atrr3;
} }
public void setAtrr3(String atrr3) { public void setAtrr3(String atrr3) {
this.atrr3 = atrr3; this.atrr3 = atrr3;
} }
public String getAtrr3() { public String getStatus() {
return atrr3; return status;
} }
public void setStatus(String status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getStatus() { public String getBucketId() {
return status; return bucketId;
} }
public void setBucketId(String bucketId) { public void setBucketId(String bucketId) {
this.bucketId = bucketId; this.bucketId = bucketId;
} }
public String getBucketId() { public String getBucketCode() {
return bucketId; return bucketCode;
} }
public void setBucketCode(String bucketCode) { public void setBucketCode(String bucketCode) {
this.bucketCode = bucketCode; this.bucketCode = bucketCode;
} }
public String getBucketCode() { public String getMaterialCode() {
return bucketCode; return materialCode;
} }
public void setMaterialCode(String materialCode) { public void setMaterialCode(String materialCode) {
this.materialCode = materialCode; this.materialCode = materialCode;
} }
public String getMaterialCode() { public String getMaterialId() {
return materialCode; return materialId;
} }
public void setMaterialId(String materialId) { public void setMaterialId(String materialId) {
this.materialId = materialId; this.materialId = materialId;
} }
public String getMaterialId() { public String getMaterialName() {
return materialId; return materialName;
} }
public void setMaterialName(String materialName) { public void setMaterialName(String materialName) {
this.materialName = materialName; this.materialName = materialName;
} }
public String getMaterialName() { public String getProductName() {
return materialName; return productName;
} }
public void setProductName(String productName) { public void setProductName(String productName) {
this.productName = productName; this.productName = productName;
} }
public String getProductName() { public Long getShiftId() {
return productName; return shiftId;
} }
public void setShiftId(Long shiftId) { public void setShiftId(Long shiftId) {
this.shiftId = shiftId; this.shiftId = shiftId;
} }
public Long getShiftId() { public String getShiftCode() {
return shiftId; return shiftCode;
} }
public void setShiftCode(String shiftCode) { public void setShiftCode(String shiftCode) {
this.shiftCode = shiftCode; this.shiftCode = shiftCode;
} }
public String getShiftCode() { public String getShiftDesc() {
return shiftCode; return shiftDesc;
} }
public void setShiftDesc(String shiftDesc) { public void setShiftDesc(String shiftDesc) {
this.shiftDesc = shiftDesc; this.shiftDesc = shiftDesc;
} }
public String getShiftDesc() { public Date getPlanTime() {
return shiftDesc; 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 @Override
@ -242,6 +282,8 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
.append("shiftCode", getShiftCode()) .append("shiftCode", getShiftCode())
.append("shiftDesc", getShiftDesc()) .append("shiftDesc", getShiftDesc())
.append("planTime",getPlanTime()) .append("planTime",getPlanTime())
.append("workorderCode",getWorkorderCode())
.append("productDate",getProductDate())
.toString(); .toString();
} }
} }

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

@ -209,6 +209,23 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
return success(); 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(); ProWetMaterialPlanDetail detail = new ProWetMaterialPlanDetail();
// 设置主键id // 设置主键id
detail.setId(IdUtils.fastSimpleUUID()); detail.setId(IdUtils.fastSimpleUUID());
// 产品名称
detail.setProductName(workorder.getProductName());
// TODO 计划工厂编码 // TODO 计划工厂编码
//detail.setFactoryCode(); //detail.setFactoryCode();
// 主计划id // 主计划id
@ -279,6 +298,14 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
detail.setShiftDesc(workorder.getShiftDesc()); detail.setShiftDesc(workorder.getShiftDesc());
// 湿料计划时间 // 湿料计划时间
detail.setPlanTime(workorder.getPlanTime()); detail.setPlanTime(workorder.getPlanTime());
// 创建者
detail.setCreateBy(SecurityContextHolder.getUserName());
// 创建时间
detail.setCreateTime(DateUtils.getNowDate());
// 更新者
detail.setUpdateBy(SecurityContextHolder.getUserName());
// 更新时间
detail.setUpdateTime(DateUtils.getNowDate());
return detail; return detail;
} }

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

@ -27,6 +27,9 @@
<result property="shiftCode" column="shift_code" /> <result property="shiftCode" column="shift_code" />
<result property="shiftDesc" column="shift_desc" /> <result property="shiftDesc" column="shift_desc" />
<result property="planTime" column="plan_time" /> <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> </resultMap>
<sql id="selectProWetMaterialPlanDetailVo"> <sql id="selectProWetMaterialPlanDetailVo">
@ -61,6 +64,13 @@
where id = #{id} where id = #{id}
</select> </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 id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
insert into pro_wet_material_plan_detail insert into pro_wet_material_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save