湿料计划(查询湿料计划详情)

highway
wws 1 year ago
parent b6506a910c
commit 39ac73dbed

@ -97,6 +97,17 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date productDate;
// 料罐名称
private String bucketName;
public String getBucketName() {
return bucketName;
}
public void setBucketName(String bucketName) {
this.bucketName = bucketName;
}
public String getId() {
return id;
}
@ -284,6 +295,7 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
.append("planTime",getPlanTime())
.append("workorderCode",getWorkorderCode())
.append("productDate",getProductDate())
.append("bucketName",getBucketName())
.toString();
}
}

@ -120,4 +120,12 @@ public interface ProWetMaterialPlanMapper {
* @return
*/
String selectWetMaterialPlanByPlanTime(Date planTime);
/**
* id
*
* @param bucketId
* @return
*/
String selectBucketNameById(String bucketId);
}

@ -219,9 +219,10 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
@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())));
detailList.get(i).setBucketName(proWetMaterialPlanMapper.selectBucketNameById(detailList.get(i).getBucketId()));
}
return success(detailList);
}

@ -65,7 +65,7 @@
</select>
<select id="selectProWetMaterialPlanDetailListById" parameterType="String" resultMap="ProWetMaterialPlanDetailResult">
select p.*,w.workorder_code,w.product_name,w.product_date
select p.*,w.workorder_code,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}

@ -86,6 +86,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where CONVERT(date, plan_time) = CONVERT(date, #{planTime})
</select>
<select id="selectBucketNameById" resultType="java.lang.String">
select equipment_name as 'bucketName'
from base_equipment
where equipment_type_code = 'equ_type_lg' and equipment_id = #{bucketId}
</select>
<insert id="insertProWetMaterialPlan" parameterType="ProWetMaterialPlan">
insert into pro_wet_material_plan
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save