Merge remote-tracking branch 'origin/master'

master
mengjiao 1 year ago
commit 54e2e97eca

@ -6,6 +6,7 @@ import com.op.system.api.factory.RemoteOpenFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
@ -16,8 +17,12 @@ import java.util.Map;
*/
@FeignClient(contextId = "remoteOpenService", value = ServiceNameConstants.OPEN_SERVICE, fallbackFactory = RemoteOpenFallbackFactory.class)
public interface RemoteOpenService {
/**提交ZL0010-来料检验不合格控制流程**/
/**提交流程**/
@PostMapping("/openInterface/OAInspection")
public AjaxResult OAInspection(@RequestBody(required = false) Map<String, Object> paramMap);
/**获取流程信息**/
@PostMapping("/openInterface/GetOaNodeInfo")
public AjaxResult GetOaNodeInfo(@RequestParam String requestId);
}

@ -8,6 +8,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
@ -20,7 +21,12 @@ public class RemoteOpenFallbackFactory implements FallbackFactory<RemoteOpenServ
return new RemoteOpenService() {
@Override
public AjaxResult OAInspection(@RequestBody(required = false) Map<String, Object> paramMap) {
return AjaxResult.error("提交ZL0010-来料检验不合格控制流程失败"+throwable.getMessage());
return AjaxResult.error("提交流程失败"+throwable.getMessage());
}
@Override
public AjaxResult GetOaNodeInfo(@RequestParam String requestId) {
return AjaxResult.error("获取流程失败"+throwable.getMessage());
}
};
}

@ -148,9 +148,11 @@ public class Constants {
//领料
public static final Integer LL=261;
//来料检验不合格控制流程workflowId
//ZL0010-来料检验不合格控制流程
public static final Integer WORKFLOWID=26235;
public static final Integer WORKFLOWID_ZL0010=26235;
//ZL0020-成品检验控制流程
public static final Integer WORKFLOWID_ZL0020=26234;
//过程检验不合格控制流程workflowId
}

@ -72,8 +72,7 @@ public class DevicePDAController extends BaseController {
return devicePDAService.updateInspectionRecord(equOrder);
}
//报修
//////////报修
/**
*
*
@ -85,8 +84,7 @@ public class DevicePDAController extends BaseController {
return devicePDAService.addRepairRecord(equRepairOrder);
}
//维修
//////////维修
/**
*
*
@ -120,7 +118,6 @@ public class DevicePDAController extends BaseController {
return devicePDAService.updateDowntime(equRepairWorkOrder);
}
/**
*
*/
@ -198,6 +195,4 @@ public class DevicePDAController extends BaseController {
public AjaxResult getFaultReasonList(EquFaultReason equFaultReason) {
return devicePDAService.selectEquFaultReasonList(equFaultReason);
}
}

@ -95,6 +95,14 @@ public class EquOperation extends BaseEntity {
/** 删除标识 */
private String delFlag;
/** 故障次数 */
@Excel(name = "故障次数")
private Integer failureTimes;
/** 停机次数 */
@Excel(name = "停机次数")
private Integer shutdownTimes;
// 创建日期范围list
private List<Date> createTimeArray;
@ -353,6 +361,22 @@ public class EquOperation extends BaseEntity {
return intactRate;
}
//故障次数
public void setFailureTimes(Integer failureTimes) {
this.failureTimes = failureTimes;
}
public Integer getFailureTimes() {
return failureTimes;
}
//停机次数
public void setShutdownTimes(Integer shutdownTimes) {
this.shutdownTimes = shutdownTimes;
}
public Integer getShutdownTimes() {
return shutdownTimes;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -99,7 +99,40 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
@DS("#header.poolName")
public AjaxResult getTodayTask(PDADTO pdadto) {
List<EquOrder> orderList = equOrderMapper.selectTodayTask(pdadto);
return success(orderList);
List<EquOrder> handleList = new ArrayList<>();
long nowTime = DateUtils.getNowDate().getTime();
long dayMs = 86400000l;
if (orderList!=null) {
for (EquOrder order : orderList) {
long diff = nowTime - order.getCreateTime().getTime();
if (order.getPlanLoopType().equals("day")){
if (diff < (dayMs * Long.valueOf(order.getPlanLoop()))) {
handleList.add(order);
}
}
if (order.getPlanLoopType().equals("week")){
if (diff < (dayMs*7 * Long.valueOf(order.getPlanLoop()))) {
handleList.add(order);
}
}
if (order.getPlanLoopType().equals("month")){
if (diff < (dayMs*30 * Long.valueOf(order.getPlanLoop()))) {
handleList.add(order);
}
}
if (order.getPlanLoopType().equals("season")){
if (diff < (dayMs*30*3 * Long.valueOf(order.getPlanLoop()))) {
handleList.add(order);
}
}
if (order.getPlanLoopType().equals("year")){
if (diff < (dayMs*365 * Long.valueOf(order.getPlanLoop()))) {
handleList.add(order);
}
}
}
}
return success(handleList);
}
/**
@ -752,18 +785,20 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
//2.3修改完好率报表
if(equOperation != null){
DecimalFormat df = new DecimalFormat("#.##");
//实际运行时间 = 实际运行时间 - 故障时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - hour;
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + hour;
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());// 运行时间
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD,2, RoundingMode.HALF_UP).toString()+"%");
if (list.getWorkDownMachine().equals("1")) {
DecimalFormat df = new DecimalFormat("#.##");
//实际运行时间 = 实际运行时间 - 故障时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - hour;
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + hour;
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());//运行时间
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD,2, RoundingMode.HALF_UP).toString()+"%");
equOperation.setShutdownTimes(equOperation.getShutdownTimes()+1);//停机次数加1
}
equOperation.setFailureTimes(equOperation.getFailureTimes()+1);//故障次数加1
equOperation.setUpdateBy(SecurityUtils.getUsername());
equOperation.setUpdateTime(DateUtils.getNowDate());
equOperationMapper.updateEquOperation(equOperation);

@ -234,22 +234,25 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
String time = sdf.format(equRepairWorkOrder.getWorkEndTime());
EquOperation equOperation = equOperationMapper.selectEquipmentIntegrityRate(time,equRepairWorkOrder.getEquipmentCode());
if(equOperation != null){
DecimalFormat df = new DecimalFormat("#.##");
//实际运行时间 = 实际运行时间 - 故障时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - Double.parseDouble(hours);
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + Double.parseDouble(hours);
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());// 运行时间
// 故障率计算(故障时间/运行时间)
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD,2, RoundingMode.HALF_UP).toString()+"%");
if(equOperation != null){
if (equRepairWorkOrder.getWorkDownMachine().equals("1")) {
DecimalFormat df = new DecimalFormat("#.##");
//实际运行时间 = 实际运行时间 - 故障时间
double result = Double.parseDouble(equOperation.getActualOperationTime()) - Double.parseDouble(hours);
//故障时间 = 原来的故障时间 + 这次的故障时间
double faultTime = Double.parseDouble(equOperation.getFaultTime()) + Double.parseDouble(hours);
BigDecimal faultTimeBD = new BigDecimal(faultTime);// 故障时间
BigDecimal operationTimeBD = new BigDecimal(equOperation.getOperationTime());// 运行时间
equOperation.setFaultTime(String.valueOf(faultTime));//故障时间
equOperation.setActualOperationTime(String.valueOf(df.format(result)));//实际运行时间
// 故障率计算(故障时间/运行时间)
equOperation.setFailureRate(faultTimeBD.multiply(new BigDecimal(100)).divide(operationTimeBD,2, RoundingMode.HALF_UP).toString()+"%");
equOperation.setShutdownTimes(equOperation.getShutdownTimes()+1);//停机次数加1
}
equOperation.setUpdateBy(SecurityUtils.getUsername());
equOperation.setUpdateTime(DateUtils.getNowDate());
//故障次数增加,但是停机次数可能不增加
equOperation.setFailureTimes(equOperation.getFailureTimes()+1);//故障次数加1
equOperationMapper.updateEquOperation(equOperation);
}
}
@ -258,7 +261,6 @@ public class EquRepairWorkOrderServiceImpl implements IEquRepairWorkOrderService
// BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equRepairWorkOrder.getOrderCode());
// BigDecimal orderCost = BigDecimal.valueOf(Double.valueOf(equRepairWorkOrder.getWorkCost()));
// equRepairWorkOrder.setWorkCost(String.valueOf(sparePartsCost.add(orderCost)));
return equRepairWorkOrderMapper.updateEquRepairWorkOrder(equRepairWorkOrder);
}

@ -77,11 +77,14 @@
<select id="getMTBFList" parameterType="EquOperation" resultType="com.op.device.domain.EquOperation">
select
row_number() over (order by cast(eo.actual_operation_time as decimal(6, 2))/2 desc) as serialNumber,
eo.equipment_code as equipmentCode,
cast(cast(eo.actual_operation_time as decimal(18,2))/(SELECT count(*) from equ_repair_work_order erwo where erwo.equipment_code = eo.equipment_code and erwo.work_status = '1' and erwo.work_down_machine = '1') as decimal(18,2)) AS mtbf
eo.equipment_code as equipmentCode,
eo.equipment_name as equipmentName,
case
when eo.shutdown_times > 0 THEN cast(cast(eo.actual_operation_time as decimal(18,2))/eo.shutdown_times as decimal(18,2))
else 0
end as mtbf
from equ_operation eo
where day(eo.create_time) = day(getdate())
and cast(eo.fault_time as decimal(6, 0)) > 0
</select>
<!--完好设备占比-->

@ -29,6 +29,7 @@
from equ_plan ep
left join equ_plan_equ epe on ep.plan_code = epe.plan_code
where ep.del_flag = '0' and epe.del_flag = '0' and ep.plan_status = '0'
and epe.equipment_code in ( select be.equipment_code from base_equipment be where be.del_flag = '0' )
and ep.plan_type = #{planType}
and CONVERT(varchar(10),GETDATE(), 120) >= CONVERT(varchar(10),ep.plan_loop_start, 120)
<if test='planType=="inspection" or planType=="maintenance" '>

@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
ORDER BY CAST(RIGHT(fault_code, 4) AS INTEGER)
</select>
<select id="selectEquFaultDescriptionByFaultId" parameterType="String" resultMap="EquFaultDescriptionResult">
@ -122,6 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_description
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
WHERE del_flag = '0'
</select>
</mapper>

@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
ORDER BY CAST(RIGHT(fault_code, 4) AS INTEGER)
</select>
<select id="selectEquFaultMeasuresByFaultId" parameterType="String" resultMap="EquFaultMeasuresResult">
@ -122,6 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_measures
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
WHERE del_flag = '0'
</select>
</mapper>

@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
ORDER BY CAST(RIGHT(fault_code, 4) AS INTEGER)
</select>
<select id="selectEquFaultReasonByFaultId" parameterType="String" resultMap="EquFaultReasonResult">
@ -122,6 +123,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_reason
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
WHERE del_flag = '0'
</select>
</mapper>

@ -50,7 +50,7 @@
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
</where>
ORDER BY create_time DESC
ORDER BY CAST(RIGHT(fault_code, 4) AS INTEGER)
</select>
<select id="selectEquFaultTypeByFaultId" parameterType="String" resultMap="EquFaultTypeResult">
@ -61,7 +61,7 @@
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(fault_id)+1 AS serialNum
FROM equ_fault_type
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time)
WHERE del_flag = '0'
</select>
<insert id="insertEquFaultType" parameterType="EquFaultType">

@ -29,6 +29,8 @@
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="failureTimes" column="failure_times"/>
<result property="shutdownTimes" column="shutdown_times"/>
</resultMap>
<sql id="selectEquOperationVo">
@ -55,7 +57,9 @@
create_by,
create_time,
update_by,
update_time
update_time,
failure_times,
shutdown_times
from equ_operation
</sql>
@ -159,6 +163,8 @@
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="failureTimes != null">failure_times,</if>
<if test="shutdownTimes != null">shutdown_times,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -185,6 +191,8 @@
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="failureTimes != null">#{failureTimes},</if>
<if test="shutdownTimes != null">#{shutdownTimes},</if>
</trim>
</insert>
@ -236,6 +244,8 @@
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="failureTimes != null">failure_times = #{failureTimes},</if>
<if test="shutdownTimes != null">shutdown_times = #{shutdownTimes},</if>
</trim>
where id = #{id}
</update>

@ -185,7 +185,7 @@
where del_flag = '0'
and user_name = #{userId}
GROUP BY order_code)
order by eo.plan_loop_type, eo.plan_loop, eo.create_time, eo.equipment_code
order by eo.plan_loop_type, eo.plan_loop, eo.create_time desc, eo.equipment_code
</select>
<select id="selectTaskRecord" parameterType="String" resultMap="EquOrderResult">

@ -87,7 +87,7 @@ public class MesReportWorkController extends BaseController {
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
// mesReportWork.setCreateTimeEnd(dateEndStr);//end
// }
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList(mesReportWork);
List<MesReportWork> list = mesReportWorkService.selectMesReportWorkList_S(mesReportWork);
ExcelUtil<MesReportWork> util = new ExcelUtil<MesReportWork>(MesReportWork.class);
util.exportExcel(response, list, "报工报表数据");
}

@ -4,6 +4,7 @@ import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.security.utils.SecurityUtils;
import com.op.mes.domain.MesUnitPrice;
import com.op.mes.service.IMesUnitPriceService;
import org.springframework.beans.factory.annotation.Autowired;
@ -23,6 +24,7 @@ import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.utils.poi.ExcelUtil;
import com.op.common.core.web.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* unitPriceController
@ -58,12 +60,25 @@ public class MesUnitPriceController extends BaseController {
ExcelUtil<MesUnitPrice> util = new ExcelUtil<MesUnitPrice>(MesUnitPrice.class);
util.exportExcel(response, list, "unitPrice数据");
}
@Log(title = "计件薪资管理", businessType = BusinessType.IMPORT)
@RequiresPermissions("system:unitPrice:import")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
ExcelUtil<MesUnitPrice> util = new ExcelUtil<MesUnitPrice>(MesUnitPrice.class);
List<MesUnitPrice> UnitPriceList = util.importExcel(file.getInputStream());
String operName = SecurityUtils.getUsername();
String message = mesUnitPriceService.importMesUnitPrice(UnitPriceList, updateSupport, operName);
return success(message);
}
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) throws IOException {
ExcelUtil<MesUnitPrice> util = new ExcelUtil<MesUnitPrice>(MesUnitPrice.class);
util.importTemplateExcel(response, "产品单价导入模板");
}
/**
* unitPrice
*/

@ -21,19 +21,18 @@ public class MesReportWork extends BaseEntity {
/** 记录id */
private String id;
/** 报工单编号 */
@Excel(name = "报工单编号")
private String reportCode;
/** 报工类型报工类型SELF自行报工、UNI统一报工 */
@Excel(name = "报工类型报工类型SELF上位机报工、UNI系统报工")
private String reportType;
/** 线体名称 */
@Excel(name = "线体名称")
private String machineName;
/** 生产工单编码 */
@Excel(name = "生产工单编码")
private String workorderCode;
/** SAP订单号 */
@Excel(name = "SAP订单号")
private String workorderCodeSap;
/** 产品编码 */
@Excel(name = "产品编码")
private String productCode;
@ -42,22 +41,73 @@ public class MesReportWork extends BaseEntity {
@Excel(name = "产品名称")
private String productName;
/** 规格型号 */
@Excel(name = "规格型号")
private String spec;
/** 批次号 */
@Excel(name = "批次号")
private String batch;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 排产数量 */
@Excel(name = "排产数量")
private BigDecimal quantity;
private BigDecimal quantitySplit;
/** 本次报工数量 */
@Excel(name = "本次报工数量")
private BigDecimal quantityFeedback;
/** 工时 */
@Excel(name = "工时")
private Long workTime;
@Excel(name = "用人")
private Long useMan;
/** 报工人员 */
@Excel(name = "报工人员")
private String nickName;
/** 报工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报工时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date feedbackTime;
/** 耗用物料编码 */
@Excel(name = "耗用物料编码")
private String materialCode;
/** 耗用物料名称 */
@Excel(name = "耗用物料名称")
private String materialName;
/** 物料消耗数量 */
@Excel(name = "物料消耗数量")
private BigDecimal quantity;
/** 物料消耗数量 */
@Excel(name = "物料消耗单位")
private String materialNameUnit;
/** 报工单编号 */
// @Excel(name = "报工单编号")
private String reportCode;
/** 报工类型报工类型SELF自行报工、UNI统一报工 */
//@Excel(name = "报工类型报工类型SELF上位机报工、UNI系统报工")
private String reportType;
/** 规格型号 */
//@Excel(name = "规格型号")
private String spec;
private BigDecimal quantitySplit;
/** 合格数量 */
//@Excel(name = "合格数量")
private BigDecimal quantityQualified;
@ -67,60 +117,50 @@ public class MesReportWork extends BaseEntity {
private BigDecimal quantityUnqualified;
/** 报工人员 */
@Excel(name = "报工人员")
//@Excel(name = "报工人员")
private String userName;
/** 人员名称 */
@Excel(name = "人员名称")
private String nickName;
/** 报工途径PAD、MOBILE、PC */
//@Excel(name = "报工途径PAD、MOBILE、PC")
private String feedbackChannel;
/** 报工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "报工时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date feedbackTime;
private String feedbackTimeStr;
/** 录入人员 */
@Excel(name = "录入人员")
//@Excel(name = "录入人员")
private String recordUser;
/** 状态 */
@Excel(name = "状态")
//@Excel(name = "状态")
private String status;
/** 工时 */
@Excel(name = "工时")
private Long workTime;
@Excel(name = "用人")
private Long useMan;
/** 线体编码 */
@Excel(name = "线体编码")
//@Excel(name = "线体编码")
private String machineCode;
/** 线体名称 */
@Excel(name = "线体名称")
private String machineName;
/** 班组编码 */
@Excel(name = "班组编码")
//@Excel(name = "班组编码")
private String teamCode;
/** 班次编码 */
@Excel(name = "班次编码")
//@Excel(name = "班次编码")
private String shiftCode;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "SAP报工时间")
//@Excel(name = "SAP报工时间")
private Date uploadTime;
@Excel(name = "SAP报工状态0待报工1成功2失败")
//@Excel(name = "SAP报工状态0待报工1成功2失败")
private String uploadStatus;
@Excel(name = "SAP报工信息")
//@Excel(name = "SAP报工信息")
private String uploadMsg;
/** 预留字段1 */
//@Excel(name = "预留字段1")
@ -137,23 +177,23 @@ public class MesReportWork extends BaseEntity {
/** 预留字段4 */
//@Excel(name = "预留字段4")
private String attr4;
@Excel(name = "计划生产日期")
//@Excel(name = "计划生产日期")
private String productDate;
private String productDateStart;
private String productDateEnd;
@Excel(name = "订单编号")
//@Excel(name = "订单编号")
private String orderCode;
@Excel(name = "规格型号")
//@Excel(name = "规格型号")
private String productSpc;
@Excel(name = "工序名称")
//@Excel(name = "工序名称")
private String processName;
@Excel(name = "工序编码")
//@Excel(name = "工序编码")
private String processCode;
private String factoryCode;
private String factoryName;
private String carCode;
private String carName;
private String workorderCodeSap;
private String routeCode;
private String sac1;
private String sac2;
@ -166,7 +206,7 @@ public class MesReportWork extends BaseEntity {
private String createTimeEnd;
private String feedbackTimeStart;
private String feedbackTimeEnd;
private String batch;
private String endReport;
private String parentOrder;
private String workorderCodes;
@ -180,8 +220,33 @@ public class MesReportWork extends BaseEntity {
private Long workTimes;
private String workCenter;
private String shiftId;
private List<MesReportWorkConsume> consumesInfos;
public String getMaterialCode() {
return materialCode;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getMaterialNameUnit() {
return materialNameUnit;
}
public void setMaterialNameUnit(String materialNameUnit) {
this.materialNameUnit = materialNameUnit;
}
public String getShiftId() {
return shiftId;
}

@ -125,4 +125,6 @@ public interface MesReportWorkMapper {
public MesReportWork getReportWorkHz(MesReportWork mesReportWork);
MesReportWork getEndReport(MesReportWork pWork);
List<MesReportWork> selectMesReportWorkList_S(MesReportWork mesReportWork);
}

@ -98,4 +98,6 @@ public interface IMesReportWorkService {
int submitReportPS(List<MesReportWork> mesReportWorks);
List<MesPrepareDetail> getPrepareList(MesPrepareDetail mesPrepareDetail);
List<MesReportWork> selectMesReportWorkList_S(MesReportWork mesReportWork);
}

@ -59,4 +59,7 @@ public interface IMesUnitPriceService {
* @return
*/
public int deleteMesUnitPriceByPicId(String picId);
public String importMesUnitPrice(List<MesUnitPrice> UnitPriceList, Boolean updateSupport,String operName);
}

@ -169,6 +169,13 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService {
return mesReportWorkMapper.getPrepareList(mesPrepareDetail);
}
@Override
@DS("#header.poolName")
public List<MesReportWork> selectMesReportWorkList_S(MesReportWork mesReportWork) {
List<MesReportWork> dtos = mesReportWorkMapper.selectMesReportWorkList_S(mesReportWork);
return dtos;
}
/**
*
*

@ -3,10 +3,15 @@ package com.op.mes.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.exception.ServiceException;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.mes.domain.MesUnitPrice;
import com.op.mes.mapper.MesUnitPriceMapper;
import com.op.mes.service.IMesUnitPriceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -19,9 +24,13 @@ import org.springframework.stereotype.Service;
*/
@Service
public class MesUnitPriceServiceImpl implements IMesUnitPriceService {
private static final Logger log = LoggerFactory.getLogger(IMesUnitPriceService.class);
@Autowired
private MesUnitPriceMapper mesUnitPriceMapper;
/**
* unitPrice
*
@ -90,4 +99,38 @@ public class MesUnitPriceServiceImpl implements IMesUnitPriceService {
public int deleteMesUnitPriceByPicId(String picId) {
return mesUnitPriceMapper.deleteMesUnitPriceByPicId(picId);
}
@Override
@DS("#header.poolName")
public String importMesUnitPrice(List<MesUnitPrice> UnitPriceList, Boolean updateSupport, String operName) {
if (StringUtils.isNull(UnitPriceList) || UnitPriceList.size() == 0) {
throw new ServiceException("导入数据不能为空!");
}
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (MesUnitPrice mesUnitPrice : UnitPriceList) {
try {
// 验证是否存在这个产线产品
mesUnitPrice.setPicId(IdUtils.simpleUUID());
mesUnitPriceMapper.insertMesUnitPrice(mesUnitPrice);
successNum++;
successMsg.append("导入成功");
} catch (Exception e) {
failureNum++;
String msg = "导入失败:";
failureMsg.append(msg + e.getMessage());
log.error(msg, e);
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
}
return successMsg.toString();
}
}

@ -118,9 +118,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
equ.equipment_type_code
</select>
<select id="getBoardFactory" resultType="com.op.system.api.domain.SysDept">
select dept_id parentName,
dept_name deptName
from sys_dept where parent_id = '1' and del_flag = '0'
select SUBSTRING(pool_name, 4, 6) parentName,
park_name deptName
from sys_datasource where del_flag = '0' and status = '0'
</select>
<select id="getTotalNumL" resultType="com.op.system.api.domain.dto.BoardDTO">
select count(0) totalNum,

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="reportType" column="report_type" />
<result property="reportCode" column="report_code" />
<result property="workorderCode" column="workorder_code" />
<result property="workorderCodeSap" column="workorder_code_sap" />
<result property="productCode" column="product_code" />
<result property="productName" column="product_name" />
<result property="spec" column="spec" />
@ -43,6 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="uploadMsg" column="upload_msg" />
<result property="orderCode" column="order_code" />
<result property="batch" column="batch" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="materialNameUnit" column="material_name_unit" />
</resultMap>
<resultMap type="com.op.system.api.domain.mes.ProOrderWorkorderDTO" id="ProOrderWorkorderDTOResult">
<result property="workorderId" column="workorder_id" />
@ -586,6 +592,53 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from mes_report_work
where end_report = '1' and workorder_code = #{workorderCode}
</select>
<select id="selectMesReportWorkList_S" parameterType="MesReportWork" resultMap="MesReportWorkResult">
SELECT
mrw.machine_name,
mrw.workorder_code,
pow.workorder_code_sap,
mrw.product_code,
mrw.product_name,
mrw.batch,
mrw.spec,
mrw.unit,
mrw.quantity_feedback,
mrw.work_time,
mrw.use_man,
mrw.nick_name,
mrw.feedback_time,
mrw.record_user,
mrwc.material_code,
mrwc.material_name,
mrwc.quantity,
mrwc.unit as material_name_unit
FROM
mes_report_work mrw
LEFT JOIN pro_order_workorder pow ON mrw.workorder_code = pow.workorder_code
LEFT JOIN mes_report_work_consume mrwc ON mrw.workorder_code=mrwc.workorder_code
<where>
and mrw.del_flag = '0' and pow.del_flag = '0'
<if test="reportCode != null and reportCode != ''"> and mrw.report_code like concat('%', #{reportCode}, '%')</if>
<if test="workorderCode != null and workorderCode != ''"> and mrw.workorder_code like concat('%', #{workorderCode}, '%')</if>
<if test="productCode != null and productCode != ''"> and mrw.product_code like concat('%', #{productCode}, '%')</if>
<if test="productName != null and productName != ''"> and mrw.product_name like concat('%', #{productName}, '%')</if>
<if test="userName != null and userName != ''"> and mrw.user_name like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != ''"> and mrw.nick_name like concat('%', #{nickName}, '%')</if>
<if test="feedbackTime != null "> and mrw.feedback_time = #{feedbackTime}</if>
<if test="machineCode != null and machineCode != ''"> and mrw.machine_code = #{machineCode}</if>
<if test="machineName != null and machineName != ''"> and mrw.machine_name like concat('%', #{machineName}, '%')</if>
<if test="teamCode != null and teamCode != ''"> and mrw.team_code = #{teamCode}</if>
<if test="shiftCode != null and shiftCode != ''"> and mrw.shift_code = #{shiftCode}</if>
<if test="createTimeStart != null "> and CONVERT(varchar(30),mrw.create_time, 120) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} > CONVERT(varchar(30),mrw.create_time, 120)</if>
<if test="feedbackTimeStart != null "> and CONVERT(varchar(10),mrw.feedback_time, 120) >= #{feedbackTimeStart}</if>
<if test="feedbackTimeEnd != null "> and #{feedbackTimeEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)</if>
<if test="orderCode != null and orderCode != ''"> and pow.order_code like concat('%', #{orderCode}, '%')</if>
<if test="uploadStatus != null and uploadStatus != ''"> and mrw.upload_status = #{uploadStatus}</if>
</where>
ORDER BY
mrw.create_time DESC
</select>
<insert id="insertMesReportWork" parameterType="MesReportWork">
insert into mes_report_work

@ -30,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectMesUnitPriceList" parameterType="MesUnitPrice" resultMap="MesUnitPriceResult">
<include refid="selectMesUnitPriceVo"/>
<where>
<if test="factoryId != null "> and factory_id = #{factoryId}</if>
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
@ -44,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
</where>
ORDER BY childprocess_code ASC
</select>
<select id="selectMesUnitPriceByPicId" parameterType="String" resultMap="MesUnitPriceResult">

@ -11,10 +11,7 @@ import com.op.system.api.domain.mes.MesReportWorkDTO;
import com.op.system.api.domain.quality.QcCheckTaskDTO;
import com.op.system.api.domain.quality.QcCheckTaskProduceDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@ -115,12 +112,25 @@ public class OpenController extends BaseController {
}
/**
* ZL0010-
* ZL0010- :"workflowId": 26235
*
* CQ OEMCM LLLB 01MATNR MAKTX suppliernum
* supplier CHARG comeQty testDate JYBH
* BJY OEMWLLY ZCF ZCOEMCM OEM
* memo PZGLBZG QC
* "workflowId": 26235
*
* -------------------------------------------------------------
* ZL0020-:"workflowId": 26234
*
* ---------------
* PGBCJ /SSCJ /ZRPSN/GJZ/SCLX/OEM OEM/DH /DW/MEMO01 /
* MEMO03 /SFXZG QC/PGZG QC
* PGZRJL
* -------------
* {"colNames":"PROCODE,PRONAME,SCCODE......","details":[{"PROCODE":"","PRONAME":"",.....},{},{},.....]}
* PROCODE PRONAME SCCODE SCTOTAL
* BJDATE JYCODE JYDATE JYRESULT0 2
* PROCODEBAK BZ CPCYS PCJYBHGMS
* @param paramMap
* @return
*/
@ -131,14 +141,13 @@ public class OpenController extends BaseController {
}
/**
* ZL0020-
*
* @param paramMap
*
* @param requestId
* @return
*/
@PostMapping("/OAProcessInspection")
public AjaxResult OAProcessInspection(@RequestBody(required = false) Map<String, Object> paramMap) {
return openService.OAProcessInspection(paramMap);
@GetMapping("/GetOaNodeInfo")
public AjaxResult GetOaNodeInfo(@RequestParam String requestId) {
return openService.GetOaNodeInfo(requestId);
}

@ -31,5 +31,5 @@ public interface OpenService {
AjaxResult OAInspection(Map<String, Object> paramMap);
AjaxResult OAProcessInspection(Map<String, Object> paramMap);
AjaxResult GetOaNodeInfo(String requestId);
}

@ -31,6 +31,7 @@ import com.op.system.api.domain.quality.*;
import com.op.system.api.domain.sap.SapCloseOrderQuery;
import com.op.system.api.domain.sap.SapRFW;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -41,8 +42,15 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
@ -64,45 +72,50 @@ public class OpenServiceImpl implements OpenService {
@Value("${OA.url}")
private String oa_url;
@Value("${OA.getnodeInfo}")
private String getnodeInfo;
@Autowired
private OpenMapper openMapper;
// @Autowired
// private RemoteSapService remoteSapService;
/**
/**
*
* JSON
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
* "reqTime": "2023-06-30 21:24:04", //请求时间,
* "rfidNo": "r12345" //rfid编号
* "factory"
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
* "reqTime": "2023-06-30 21:24:04", //请求时间,
* "rfidNo": "r12345" //rfid编号
* "factory"
* }
*
* <p>
* JSON
* {
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
* "code": 0, //返回代码
* "message": "OK", //返回信息
* "stationType": "2", //目的机台类型 2烘房 3收坯机
* "sku": "sku01", //物料编码
* "spec": "150", //规格
* "productionState": "K01", //当前工艺状态
* "stationNos": [
* {
* "stationNo": "F1", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* },
* {
* "stationNo": "F3", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* },
* {
* "stationNo": "F3", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* }
* ],
* "reqCode": "eb7f8e9f-d1e8-499e-9bcb-e72d3ac195b0", //请求ID
* "code": 0, //返回代码
* "message": "OK", //返回信息
* "stationType": "2", //目的机台类型 2烘房 3收坯机
* "sku": "sku01", //物料编码
* "spec": "150", //规格
* "productionState": "K01", //当前工艺状态
* "stationNos": [
* {
* "stationNo": "F1", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* },
* {
* "stationNo": "F3", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* },
* {
* "stationNo": "F3", //目的站台编号
* "qty": 2 //针对于烘房前面的当前筛盘车的数量如果数量大于2就不会往改烘房分配
* }
* ],
* }
*
* @param wcsdto
* @return
*/
@ -148,7 +161,7 @@ public class OpenServiceImpl implements OpenService {
if (StringUtils.isNotBlank(machineCode)) {
//设备是否正常
String status = openMapper.getEquipStatus(machineCode);
if(StringUtils.isNotBlank(status) && "1".equals(status)){//正常设备且没被删除
if (StringUtils.isNotBlank(status) && "1".equals(status)) {//正常设备且没被删除
wCSDataDTO.setStationNo(machineCode);
if ("2".equals(stationType)) {
Integer qty = openMapper.getEquipNum(machineCode);
@ -162,11 +175,11 @@ public class OpenServiceImpl implements OpenService {
}
dto.setStationNos(stationNos);
dto.setCode("0");
}else{
} else {
dto.setCode("1");
dto.setMessage("MES管理系统接口调用异常:数据缺失");
}
}catch (Exception e){
} catch (Exception e) {
dto.setCode("1");
dto.setMessage("MES管理系统接口调用失败");
}
@ -256,20 +269,20 @@ public class OpenServiceImpl implements OpenService {
@Override
public List<WCSDTO> getLGInfo(WCSDTO wcsDTO) {
DynamicDataSourceContextHolder.push("ds_"+wcsDTO.getFactory());// 这是数据源的key
DynamicDataSourceContextHolder.push("ds_" + wcsDTO.getFactory());// 这是数据源的key
return openMapper.getLGInfo(wcsDTO);
}
@Override
public AjaxResult machineRepair(EquRepairOrderDTO equRepairOrderDTO) {
DynamicDataSourceContextHolder.push("ds_"+equRepairOrderDTO.getFactory());// 这是数据源的key
DynamicDataSourceContextHolder.push("ds_" + equRepairOrderDTO.getFactory());// 这是数据源的key
// 创建报修单
DeviceRepairOrder equRepairOrder = new DeviceRepairOrder();
// 获取故障报修流水号
String serialNum = String.format("%03d", openMapper.selectOrderCodeSerialNumber());
equRepairOrder.setOrderCode("BX"+DateUtils.dateTimeNow(DateUtils.YYYYMMDD)+equRepairOrderDTO.getEquipmentCode()+serialNum);// 报修单号
equRepairOrder.setOrderCode("BX" + DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + equRepairOrderDTO.getEquipmentCode() + serialNum);// 报修单号
equRepairOrder.setOrderId(IdUtils.fastSimpleUUID());// id
equRepairOrder.setEquipmentCode(equRepairOrderDTO.getEquipmentCode());
equRepairOrder.setOrderSource("上位机");// 故障来源
@ -290,7 +303,7 @@ public class OpenServiceImpl implements OpenService {
@Override
public int insertQcCheckTaskProduce(QcCheckTaskProduceDTO qcCheckTaskProduce) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskProduce.getFactoryCode());
DynamicDataSourceContextHolder.push("ds_" + qcCheckTaskProduce.getFactoryCode());
qcCheckTaskProduce.setCreateTime(DateUtils.getNowDate());
@ -299,20 +312,20 @@ public class OpenServiceImpl implements OpenService {
String liushuiStr = String.format("%04d", liushuiNum);
String createBy = SecurityUtils.getUsername();
Date nowDate= DateUtils.getNowDate();
Date nowDate = DateUtils.getNowDate();
//获取当前所选工厂
String factoryCode = qcCheckTaskProduce.getFactoryCode();
String beLongId = IdUtils.fastSimpleUUID();
qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr);
qcCheckTaskProduce.setCheckNo(bpDD + liushuiStr);
/**取检测项**/
QcCheckTypeProjectDTO qctp= new QcCheckTypeProjectDTO();
QcCheckTypeProjectDTO qctp = new QcCheckTypeProjectDTO();
qctp.setTypeId(qcCheckTaskProduce.getCheckType());//生产过程检验
qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性
/**qc_user_material取默认检查人**/
List<QcUserMaterialDTO> users = openMapper.getUserByMaterial(qcCheckTaskProduce.getMaterialCode());
if(CollectionUtils.isEmpty(users)){
if (CollectionUtils.isEmpty(users)) {
QcUserMaterialDTO dto0 = new QcUserMaterialDTO();
dto0.setId(IdUtils.fastSimpleUUID());
dto0.setBelongTo(beLongId);
@ -323,8 +336,8 @@ public class OpenServiceImpl implements OpenService {
dto0.setUserCode("mobile");
dto0.setUserName("手持测试用户");
users.add(dto0);
}else{
for(QcUserMaterialDTO user:users){
} else {
for (QcUserMaterialDTO user : users) {
user.setId(IdUtils.fastSimpleUUID());
user.setBelongTo(beLongId);
user.setCheckNo(qcCheckTaskProduce.getCheckNo());
@ -333,15 +346,15 @@ public class OpenServiceImpl implements OpenService {
user.setCreateTime(nowDate);
}
}
int m=openMapper.addCheckUsers(users);
logger.info("检查人新增"+m+"成功");
int m = openMapper.addCheckUsers(users);
logger.info("检查人新增" + m + "成功");
/**qc_check_type_project**/
List<QcCheckTaskDetailDTO> items = openMapper.getTPByTypeMaterial(qctp);
if(CollectionUtils.isEmpty(items)){
if (CollectionUtils.isEmpty(items)) {
/**qc_material_group_detail**/
QcMaterialGroupDetailDTO group = openMapper.getGroupByMaterial(qcCheckTaskProduce.getMaterialCode());
if(group == null){
if (group == null) {
return 0;//没有找到检测项目
}
qctp.setGroupId(group.getGroupId());//共性
@ -349,7 +362,7 @@ public class OpenServiceImpl implements OpenService {
}
/**qc_check_task_detail**/
if(CollectionUtils.isEmpty(items)){
if (CollectionUtils.isEmpty(items)) {
return 0;//没有找到检测项目
}
@ -364,7 +377,7 @@ public class OpenServiceImpl implements OpenService {
qcCheckTaskProduce.setSupplierName(qcCheckTaskProduce.getCarName());
openMapper.insertQcCheckTaskProduce(qcCheckTaskProduce);
/**qc_check_task_detail**/
for(QcCheckTaskDetailDTO item:items){
for (QcCheckTaskDetailDTO item : items) {
item.setRecordId(IdUtils.fastSimpleUUID());
item.setBelongTo(beLongId);
item.setCreateTime(nowDate);
@ -377,10 +390,26 @@ public class OpenServiceImpl implements OpenService {
@Override
public AjaxResult OAInspection(Map<String, Object> paramMap) {
try {
String result = HttpUtils.sendPostOA(oa_url, convertJsonToUrlParams(JSONObject.toJSONString(paramMap)));
// 从paramMap中提取需要的参数
String user = paramMap.get("user").toString();
String requestLevel = paramMap.get("requestLevel").toString();
String requestName = paramMap.get("requestName").toString();
String workflowId = paramMap.get("workflowId").toString();
String mainObject = paramMap.get("mainObject").toString();
// Building the postData string using StringBuilder
StringBuilder postDataBuilder = new StringBuilder();
postDataBuilder.append("user=").append(user)
.append("&requestLevel=").append(requestLevel)
.append("&requestName=").append(URLEncoder.encode(requestName, StandardCharsets.UTF_8.toString()))
.append("&workflowId=").append(workflowId)
.append("&mainObject=").append(URLEncoder.encode(mainObject, StandardCharsets.UTF_8.toString()));
if (Constants.WORKFLOWID_ZL0020.equals(workflowId)) {
postDataBuilder.append("&details=").append(URLEncoder.encode(mainObject, StandardCharsets.UTF_8.toString()));
}
String postData = postDataBuilder.toString();
String result = HttpUtils.sendPostOA(oa_url, postData);
System.out.println(result);
//返回示例{"result":"0","info":"成功","requestid":"2193799"}
Map resultMap=JSONObject.parseObject(result);
@ -389,62 +418,25 @@ public class OpenServiceImpl implements OpenService {
}else {
return error(resultMap.get("info").toString());
}
} catch (Exception e) {
e.printStackTrace();
return error(e.getMessage());
}
}
}
@Override
public AjaxResult OAProcessInspection(Map<String, Object> paramMap) {
try {
String result = HttpUtils.sendPostOA(oa_url, convertJsonToUrlParams(JSONObject.toJSONString(paramMap)));
System.out.println(result);
//返回示例{"result":"0","info":"成功","requestid":"2193799"}
Map resultMap=JSONObject.parseObject(result);
if (resultMap.get("result").equals(Constants.LOGIN_SUCCESS_STATUS)){
return success(resultMap.get("info").toString(),resultMap.get("requestid").toString());
}else {
return error(resultMap.get("info").toString());
}
public AjaxResult GetOaNodeInfo(String requestId) {
try {
String result = HttpUtils.sendGet(getnodeInfo,"requestId="+requestId);
return success(result);
} catch (Exception e) {
e.printStackTrace();
return error(e.getMessage());
}
}
public static String convertJsonToUrlParams(String json) throws IOException {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonNode = objectMapper.readTree(json);
StringBuilder urlParams = new StringBuilder();
Iterator<String> fieldNames = jsonNode.fieldNames();
while (fieldNames.hasNext()) {
String fieldName = fieldNames.next();
JsonNode fieldValue = jsonNode.get(fieldName);
if (urlParams.length() > 0) {
urlParams.append("&");
}
urlParams.append(fieldName).append("=").append(fieldValue);
}
return urlParams.toString();
}
public static void main(String args[]){
Map<String, Object> paramMap =new HashMap<>();
paramMap.put("A","B");
paramMap.put("C","D");
paramMap.put("E","F");
System.out.println(JSONObject.toJSONString(paramMap));
// DateTimeFormatter ymdhms = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// LocalDate today = LocalDate.now();
// LocalDate lastMonth3 = today.plus(-3, ChronoUnit.MONTHS);
//
// System.out.println("7天之前的日期为:"+lastMonth3.getYear());
}
}

@ -9,10 +9,7 @@ import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.quality.domain.*;
import com.op.quality.service.IQcCheckReportProduceService;
import com.op.system.api.domain.SysUser;
import org.apache.commons.lang.StringUtils;
@ -177,4 +174,11 @@ public class QcCheckReportProduceController extends BaseController {
List<QcCheckTaskDetail> list = qcCheckReportProduceService.getCkeckProjectList(qcCheckTaskDetail);
return getDataTable(list);
}
/**巡检报表数据**/
@PostMapping("/getProduceReportXJ")
public QcCheckTaskProduce getProduceReportXJ(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) {
QcCheckTaskProduce dto = qcCheckReportProduceService.getProduceReportXJ(qcCheckTaskProduce);
return dto;
}
}

@ -2,6 +2,8 @@ package com.op.quality.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.quality.domain.QcCheckType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -94,4 +96,13 @@ public class QcSampleRuleController extends BaseController {
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcSampleRuleService.deleteQcSampleRuleByIds(ids));
}
/**
*
*/
@GetMapping(value = "/getCheckType/{typeCode}")
public TableDataInfo getCheckType(@PathVariable("typeCode") String typeCode) {
List<QcCheckType> list = qcSampleRuleService.selectCheckType(typeCode);
return getDataTable(list);
}
}

@ -125,6 +125,15 @@ public class QcCheckReportIncome extends BaseEntity {
private String typeCode;//大类
private String checkType;//小类
private String checkName;
private String createTimeStr;
public String getCreateTimeStr() {
return createTimeStr;
}
public void setCreateTimeStr(String createTimeStr) {
this.createTimeStr = createTimeStr;
}
public String getCheckName() {
return checkName;

@ -2,6 +2,8 @@ package com.op.quality.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@ -129,6 +131,7 @@ public class QcCheckTaskProduce extends BaseEntity {
private String checkType;
private String workorderCode;
private String orderType;
private String lineName;
@Excel(name = "抽样数量")
private BigDecimal sampleQuality;
@ -145,6 +148,23 @@ public class QcCheckTaskProduce extends BaseEntity {
@Excel(name = "C类不合格数量")
private BigDecimal cNoOkquality;
private String checkName;
private List<QcStaticTable> checkInfos;
public List<QcStaticTable> getCheckInfos() {
return checkInfos;
}
public void setCheckInfos(List<QcStaticTable> checkInfos) {
this.checkInfos = checkInfos;
}
public String getLineName() {
return lineName;
}
public void setLineName(String lineName) {
this.lineName = lineName;
}
public String getCheckName() {
return checkName;

@ -71,4 +71,6 @@ public interface QcCheckReportIncomeMapper {
int getTodayMaxNum(QcCheckReportIncome qcCheckReportIncome);
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
QcCheckTaskProduce getTopInfo(QcCheckTaskProduce qcCheckTaskProduce);
}

@ -2,6 +2,7 @@ package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskProduce;
import com.op.quality.domain.QcCheckType;
import com.op.system.api.domain.mes.ProOrderWorkorderDTO;
@ -73,4 +74,12 @@ public interface QcCheckTaskProduceMapper {
List<QcCheckTaskProduce> getOrderWorks(ProOrderWorkorderDTO qoWork);
List<String> selectQcCheckTaskCheckNoByRecordIds(String[] recordIds);
/**
*
*
* @param qcCheckReportIncome
* @return
*/
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome);
}

@ -1,9 +1,6 @@
package com.op.quality.service;
import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.quality.domain.*;
import com.op.system.api.domain.SysUser;
import java.util.List;
@ -73,5 +70,5 @@ public interface IQcCheckReportProduceService {
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome);
QcCheckTaskProduce getProduceReportXJ(QcCheckTaskProduce qcCheckTaskProduce);
}

@ -1,6 +1,8 @@
package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcCheckType;
import com.op.quality.domain.QcSampleRule;
/**
@ -57,4 +59,6 @@ public interface IQcSampleRuleService {
* @return
*/
public int deleteQcSampleRuleById(String id);
public List<QcCheckType> selectCheckType(String typeCode);
}

@ -5,11 +5,9 @@ import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.QcCheckReportIncomeMapper;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckReportProduceService;
import com.op.quality.service.IQcStaticTableService;
import com.op.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -31,6 +29,8 @@ import java.util.List;
public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceService {
@Autowired
private QcCheckReportIncomeMapper qcCheckReportIncomeMapper;
@Autowired
private QcCheckTaskProduceMapper qcCheckTaskProduceMapper;
@Autowired
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
@ -40,7 +40,8 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
@Autowired
private IQcStaticTableService qcStaticTableService;
/**
*
*
@ -64,7 +65,7 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("produce");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
return qcCheckTaskProduceMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
}
/**
@ -197,8 +198,14 @@ public class QcCheckReportProduceServiceImpl implements IQcCheckReportProduceSer
}
@Override
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome) {
return null;
@DS("#header.poolName")
public QcCheckTaskProduce getProduceReportXJ(QcCheckTaskProduce qcCheckTaskProduce) {
QcCheckTaskProduce produce = qcCheckReportIncomeMapper.getTopInfo(qcCheckTaskProduce);
QcStaticTable qcStaticTable = new QcStaticTable();
qcStaticTable.setOrderNo(qcCheckTaskProduce.getOrderNo());
List<QcStaticTable> checkInfos = qcStaticTableService.getXJCheckTableDetail(qcStaticTable);
produce.setCheckInfos(checkInfos);
return produce;
}
}

@ -6,6 +6,9 @@ import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcCheckType;
import com.op.quality.mapper.QcCheckTypeMapper;
import com.op.quality.service.IQcCheckTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcSampleRuleMapper;
@ -27,6 +30,9 @@ public class QcSampleRuleServiceImpl implements IQcSampleRuleService {
@Autowired
private QcSampleRuleMapper qcSampleRuleMapper;
@Autowired
private QcCheckTypeMapper qcCheckTypeMapper;
/**
*
*
@ -106,4 +112,12 @@ public class QcSampleRuleServiceImpl implements IQcSampleRuleService {
public int deleteQcSampleRuleById(String id) {
return qcSampleRuleMapper.deleteQcSampleRuleById(id);
}
@Override
@DS("#header.poolName")
public List<QcCheckType> selectCheckType(String typeCode) {
QcCheckType qcCheckType = new QcCheckType();
qcCheckType.setTypeCode(typeCode);
return qcCheckTypeMapper.selectQcCheckTypeList(qcCheckType);
}
}

@ -48,11 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectQcCheckReportIncomeList" parameterType="QcCheckReportIncome" resultMap="QcCheckReportIncomeResult">
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,qct.sample_quality,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code,q.check_name
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,qct.sample_quality,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,
q.type_code,q.check_name
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where>
@ -143,8 +143,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join qc_check_type_project qctp on td.type_project_id = qctp.id
where td.belong_to = #{recordId}
</select>
<select id="getTopInfo" resultType="com.op.quality.domain.QcCheckTaskProduce">
select t.*,be.equipment_name lineName from(
SELECT
c.order_no orderNo,
c.supplier_name supplierName,
c.supplier_code supplierCode,
c.material_name materialName,
c.material_code materialCode,
CONVERT(varchar(10),c.income_time, 120) checkTimeStart,
stuff( ( SELECT ';' + income_batch_no FROM qc_check_task WHERE c.order_no= order_no FOR xml path ( '' ) ), 1, 1, '' ) as incomeBatchNo
FROM
qc_check_task c
where c.check_type='checkTypeSCXJ' and c.order_no = #{orderNo}
GROUP BY
c.order_no,c.supplier_name,c.supplier_code,c.material_name,c.material_code,CONVERT(varchar(10),c.income_time, 120)
) t
left join pro_order_workorder pow on pow.workorder_code = t.orderNo
left join base_equipment be on be.equipment_code = pow.workorder_name
</select>
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
<insert id="insertQcCheckReportIncome" parameterType="QcCheckReportIncome">
insert into qc_check_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>

@ -11,9 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="orderNo" column="order_no" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="quality" column="quality" />
<result property="sampleQuality" column="sample_quality" />
<result property="noOkQuality" column="noOk_quality" />
<result property="quality" column="quality" />
<result property="unit" column="unit" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
@ -35,9 +33,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="checkType" column="check_type" />
<result property="checkName" column="check_name" />
<result property="sampleQuality" column="sample_quality" />
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
</resultMap>
<resultMap type="QcCheckReportIncome" id="QcCheckReportIncomeResult">
<result property="recordId" column="record_id" />
<result property="checkNo" column="check_no" />
<result property="incomeBatchNo" column="income_batch_no" />
<result property="orderNo" column="order_no" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
<result property="quality" column="quality" />
<result property="unit" column="unit" />
<result property="supplierCode" column="supplier_code" />
<result property="supplierName" column="supplier_name" />
<result property="incomeTime" column="income_time" />
<result property="checkLoc" column="check_loc" />
<result property="checkStatus" column="check_status" />
<result property="checkManCode" column="check_man_code" />
<result property="checkManName" column="check_man_name" />
<result property="checkTime" column="check_time" />
<result property="checkResult" column="check_result" />
<result property="status" column="status" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="sampleQuality" column="sample_quality" />
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
<result property="createTimeStr" column="createTimeStr" />
</resultMap>
<sql id="selectQcCheckTaskProduceVo">
@ -266,4 +299,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{recordId}
</foreach>
</select>
<select id="selectQcCheckReportIncomeList" parameterType="QcCheckReportIncome" resultMap="QcCheckReportIncomeResult">
select * from (
select qct.record_id, qct.check_no, qct.income_batch_no,
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_time, qct.check_result, qct.check_type,'首件检验' check_name,
CONVERT(varchar(10),qct.create_time, 120) createTimeStr
from qc_check_task qct
<where>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.create_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.create_time, 120)</if>
and qct.check_type = 'checkTypeSC'
</where>
union ALL
select
'','','',
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time,'','',
'','', qct.check_type,'巡检检验' check_name,CONVERT(varchar(10),qct.create_time, 120) createTimeStr
from qc_check_task qct
<where>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
<if test="orderNo != null and orderNo != ''"> and qct.order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and qct.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and qct.material_name like concat('%', #{materialName}, '%')</if>
<if test="supplierCode != null and supplierCode != ''"> and qct.supplier_code = #{supplierCode}</if>
<if test="supplierName != null and supplierName != ''"> and qct.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="checkLoc != null and checkLoc != ''"> and qct.check_loc = #{checkLoc}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status = #{checkStatus}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkManName != null and checkManName != ''"> and qct.check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkResult != null and checkResult != ''"> and qct.check_result = #{checkResult}</if>
<if test="incomeTimeStart != null "> and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
<if test="incomeTimeEnd != null "> and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.create_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.create_time, 120)</if>
and qct.check_type = 'checkTypeSCXJ'
</where>
GROUP BY qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120)
) t order by t.order_no,t.createTimeStr desc
</select>
</mapper>

@ -318,28 +318,8 @@ public class SapItemSyncImpl implements SapItemSyncService {
throw new RuntimeException("Function does not exist in SAP");
}
JCoTable L_ITEM = func.getTableParameterList().getTable("L_ITEM");
// System.out.println(L_ITEM);
//
// int successNum = 0;
// int failureNum = 0;
// StringBuilder successMsg = new StringBuilder();
// StringBuilder failureMsg = new StringBuilder();
log.info("反冲物料开始过账----------------------------------------");
// for (int i = 0; i < sapBackflushMPQueryList.size(); i++) {
// L_ITEM.setRow(i);
// L_ITEM.appendRow();
// L_ITEM.setValue("MATNR",sfp.getMatnr());
// }
for (SapBackflushMPQuery sfp:sapBackflushMPQueryList){
// if (StringUtils.isEmpty(sfp.getMatnr())){
// return R.fail("物料号为空!");
// }
// if (StringUtils.isEmpty(sfp.getPlant())){
//
// }
L_ITEM.appendRow();
L_ITEM.setValue("MATNR",sfp.getMatnr());
L_ITEM.setValue("PLANT",sfp.getPlant());
@ -350,7 +330,6 @@ public class SapItemSyncImpl implements SapItemSyncService {
L_ITEM.setValue("MEINS",sfp.getMeins());
L_ITEM.setValue("BATCH",sfp.getBatch());
L_ITEM.setValue("MOVE_BATCH",sfp.getMove_batch());
}
func.execute(dest);
JCoTable maraTable = func.getTableParameterList().getTable("LT_RETURN");

@ -47,6 +47,10 @@ public class SysFactory extends TreeEntity {
@Excel(name = "工厂编码")
private String factoryCode;
/** 工厂建模类型 */
@Excel(name = "工厂建模类型")
private String fType;
//虚拟字段
private List<Map<String,String>> workCenter;
private String value;
@ -111,6 +115,13 @@ public class SysFactory extends TreeEntity {
this.factoryCode = factoryCode;
}
public String getFType() {
return fType;
}
public void setFType(String fType) {
this.fType = fType;
}
public String getValue() {
return value;
}

@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="fType" column="f_type" />
</resultMap>
<sql id="selectSysFactoryVo">
select factory_id, parent_id, ancestors, factory_name, order_num, leader, phone, email, status, del_flag, create_by, create_time, update_by, update_time, factory_code,del_flag from sys_factory
select factory_id, parent_id, ancestors, factory_name, order_num, leader, phone, email, status, del_flag, create_by, create_time, update_by, update_time, factory_code,del_flag , f_type from sys_factory
</sql>
<select id="selectSysFactoryList" parameterType="SysFactory" resultMap="SysFactoryResult">
@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="fType != null and fType != ''"> and f_type = #{fType}</if>
and del_flag = '0'
</where>
</select>
@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="fType != null">f_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parentId != null">#{parentId},</if>
@ -82,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="fType != null">#{fType},</if>
</trim>
</insert>
@ -102,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="fType != null">f_type = #{fType},</if>
</trim>
where factory_id = #{factoryId}
</update>

Loading…
Cancel
Save