湿料计划管理(计划导出)

highway
wws 1 year ago
parent f41fcabf8a
commit d59136a945

@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.op.plan.domain.ProOrderWorkorder;
import com.op.plan.domain.ProWetMaterialPlanDetail;
import com.op.plan.service.IProWetMaterialPlanDetailService;
import com.op.system.api.RemoteUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -30,6 +31,8 @@ import com.op.common.core.web.page.TableDataInfo;
public class ProWetMaterialPlanController extends BaseController {
@Autowired
private IProWetMaterialPlanService proWetMaterialPlanService;
@Autowired
private IProWetMaterialPlanDetailService proWetMaterialPlanDetailService;
/**
* id
@ -137,8 +140,8 @@ public class ProWetMaterialPlanController extends BaseController {
@Log(title = "湿料计划管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ProWetMaterialPlan proWetMaterialPlan) {
List<ProWetMaterialPlan> list = proWetMaterialPlanService.selectProWetMaterialPlanList(proWetMaterialPlan);
ExcelUtil<ProWetMaterialPlan> util = new ExcelUtil<ProWetMaterialPlan>(ProWetMaterialPlan.class);
List<ProWetMaterialPlanDetail> list = proWetMaterialPlanDetailService.selectProWetMaterialPlanDetailList(proWetMaterialPlan);
ExcelUtil<ProWetMaterialPlanDetail> util = new ExcelUtil<ProWetMaterialPlanDetail>(ProWetMaterialPlanDetail.class);
util.exportExcel(response, list, "湿料计划管理数据");
}

@ -33,23 +33,19 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
private String workorderId;
/** */
@Excel(name = "")
private String atrr1;
/** */
@Excel(name = "")
private String atrr2;
/** */
@Excel(name = "")
private String atrr3;
/** 1接料完成0未接料 */
@Excel(name = "1接料完成0未接料")
@Excel(name = "是否接料",readConverterExp = "N=未接料,Y=已接料")
private String status;
/** 料罐id */
@Excel(name = "料罐id")
private String bucketId;
/** 料罐编码 */
@ -57,11 +53,9 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
private String bucketCode;
/** 物料编码 */
@Excel(name = "物料编码")
private String materialCode;
/** 物料id */
@Excel(name = "物料id")
private String materialId;
/** 物料名称 */
@ -73,11 +67,9 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
private String productName;
/** 班次id */
@Excel(name = "班次id")
private Long shiftId;
/** 班次编码 */
@Excel(name = "班次编码")
private String shiftCode;
/** 班次简称 */
@ -86,7 +78,7 @@ public class ProWetMaterialPlanDetail extends BaseEntity {
/** 计划日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd")
@Excel(name = "计划日期", width = 30, dateFormat = "yyyy-MM-dd",sort = 1)
private Date planTime;
// 工单编码

@ -6,7 +6,6 @@ import com.op.plan.domain.Convert;
import com.op.plan.domain.ProLine;
import com.op.plan.domain.ProOrder;
import com.op.plan.domain.ProShift;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.plan.domain.*;
import com.op.system.api.model.SapProOrder;
import org.apache.ibatis.annotations.Mapper;

@ -1,6 +1,7 @@
package com.op.plan.mapper;
import com.op.plan.domain.ProWetMaterialPlan;
import com.op.plan.domain.ProWetMaterialPlanDetail;
import org.apache.ibatis.annotations.Mapper;
@ -85,4 +86,11 @@ public interface ProWetMaterialPlanDetailMapper {
List<ProWetMaterialPlanDetail> selectProWetMaterialPlanDetailByOrderId(String id);
List<ProWetMaterialPlanDetail> selectDetailListById(String id);
/**
* 湿-
* @param proWetMaterialPlan
* @return
*/
List<ProWetMaterialPlanDetail> selectWetPlanList(ProWetMaterialPlan proWetMaterialPlan);
}

@ -0,0 +1,16 @@
package com.op.plan.service;
import com.op.plan.domain.ProWetMaterialPlan;
import com.op.plan.domain.ProWetMaterialPlanDetail;
import java.util.List;
public interface IProWetMaterialPlanDetailService {
/**
* 湿
* @param proWetMaterialPlan
* @return
*/
List<ProWetMaterialPlanDetail> selectProWetMaterialPlanDetailList(ProWetMaterialPlan proWetMaterialPlan);
}

@ -0,0 +1,28 @@
package com.op.plan.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.plan.domain.ProWetMaterialPlan;
import com.op.plan.domain.ProWetMaterialPlanDetail;
import com.op.plan.mapper.ProWetMaterialPlanDetailMapper;
import com.op.plan.service.IProWetMaterialPlanDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ProWetMaterialPlanDetailServiceImpl implements IProWetMaterialPlanDetailService {
@Autowired
private ProWetMaterialPlanDetailMapper proWetMaterialPlanDetailMapper;
/**
* 湿
* @param proWetMaterialPlan
* @return
*/
@Override
@DS("#header.poolName")
public List<ProWetMaterialPlanDetail> selectProWetMaterialPlanDetailList(ProWetMaterialPlan proWetMaterialPlan) {
return proWetMaterialPlanDetailMapper.selectWetPlanList(proWetMaterialPlan);
}
}

@ -36,7 +36,7 @@ import static com.op.common.core.web.domain.AjaxResult.success;
/**
* 湿Service
*
* @author zxl
* @author wws
* @date 2023-07-24
*/
@Service

@ -95,6 +95,16 @@
where wet_material_plan_id = #{id}
</select>
<select id="selectWetPlanList" resultMap="ProWetMaterialPlanDetailResult">
select id, factory_code, wet_material_plan_id, workorder_id, atrr1, atrr2, atrr3, status,
create_by, create_time, update_by, update_time, bucket_id, bucket_code,
material_code, material_id, material_name, product_name, shift_id,
shift_code, shift_desc, plan_time
from pro_wet_material_plan_detail
where CONVERT(date,plan_time) >= #{startTime} and #{endTime} >= CONVERT(date,plan_time)
ORDER BY plan_time DESC
</select>
<insert id="insertProWetMaterialPlanDetail" parameterType="ProWetMaterialPlanDetail">
insert into pro_wet_material_plan_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save