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

highway
wws 1 year ago
parent b6506a910c
commit 39ac73dbed

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

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

@ -219,9 +219,10 @@ public class ProWetMaterialPlanServiceImpl implements IProWetMaterialPlanService
@DS("#header.poolName") @DS("#header.poolName")
public AjaxResult getWetMaterialPlanDetailListById(String id) { public AjaxResult getWetMaterialPlanDetailListById(String id) {
List<ProWetMaterialPlanDetail> detailList = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailListById(id); List<ProWetMaterialPlanDetail> detailList = proWetMaterialPlanDetailMapper.selectProWetMaterialPlanDetailListById(id);
// 获取班次名称 // 获取班次名称和料罐名称
for (int i = 0;i < detailList.size();i++){ for (int i = 0;i < detailList.size();i++){
detailList.get(i).setShiftDesc(proWetMaterialPlanMapper.selectShiftById(String.valueOf(detailList.get(i).getShiftId()))); 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); return success(detailList);
} }

@ -65,7 +65,7 @@
</select> </select>
<select id="selectProWetMaterialPlanDetailListById" parameterType="String" resultMap="ProWetMaterialPlanDetailResult"> <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 from pro_wet_material_plan_detail p join pro_order_workorder w
on w.workorder_id = p.workorder_id on w.workorder_id = p.workorder_id
where p.wet_material_plan_id = #{id} where p.wet_material_plan_id = #{id}

@ -86,7 +86,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where CONVERT(date, plan_time) = CONVERT(date, #{planTime}) where CONVERT(date, plan_time) = CONVERT(date, #{planTime})
</select> </select>
<insert id="insertProWetMaterialPlan" parameterType="ProWetMaterialPlan"> <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 insert into pro_wet_material_plan
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>

Loading…
Cancel
Save