Commit 53502dba authored by 李驰骋's avatar 李驰骋

工单关闭操作BUG修复

工作单元添加产线、序号字段
物料添加产线字段
parent dc82eeaa
...@@ -41,6 +41,8 @@ logging: ...@@ -41,6 +41,8 @@ logging:
druid: druid:
sql: sql:
Statement: debug Statement: debug
file:
name: mes.log
# Spring配置 # Spring配置
spring: spring:
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<!-- 日志存放路径 --> <!-- 日志存放路径 -->
<property name="log.path" value="/home/ximai/logs" /> <property name="log.path" value="d:/logs/mes" />
<!-- 日志输出格式 --> <!-- 日志输出格式 -->
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
<charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
...@@ -24,6 +25,7 @@ ...@@ -24,6 +25,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
<charset>UTF-8</charset>
</encoder> </encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 --> <!-- 过滤的级别 -->
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
<charset>UTF-8</charset>
</encoder> </encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter"> <filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 --> <!-- 过滤的级别 -->
...@@ -68,6 +71,7 @@ ...@@ -68,6 +71,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
<charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
...@@ -82,6 +86,7 @@ ...@@ -82,6 +86,7 @@
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>
<charset>UTF-8</charset>
</encoder> </encoder>
</appender> </appender>
......
...@@ -12,6 +12,7 @@ import com.ximai.common.utils.excel.ExcelWriter; ...@@ -12,6 +12,7 @@ import com.ximai.common.utils.excel.ExcelWriter;
import com.ximai.mes.md.domain.MdWorkunit; import com.ximai.mes.md.domain.MdWorkunit;
import com.ximai.mes.md.dto.MdWorkunitExcelExport; import com.ximai.mes.md.dto.MdWorkunitExcelExport;
import com.ximai.mes.md.mapper.MdWorkunitMapper; import com.ximai.mes.md.mapper.MdWorkunitMapper;
import com.ximai.mes.md.service.IMdItemService;
import com.ximai.mes.md.service.IMdWorkunitService; import com.ximai.mes.md.service.IMdWorkunitService;
import com.ximai.mes.md.vo.MdItemVo; import com.ximai.mes.md.vo.MdItemVo;
import com.ximai.mes.md.vo.MdWorkunitVo; import com.ximai.mes.md.vo.MdWorkunitVo;
...@@ -41,6 +42,9 @@ public class MdWorkunitController extends BaseController { ...@@ -41,6 +42,9 @@ public class MdWorkunitController extends BaseController {
@Autowired @Autowired
private MdWorkunitMapper mdWorkunitMapper; private MdWorkunitMapper mdWorkunitMapper;
@Autowired
private IMdItemService itemService;
@Autowired @Autowired
private ITmToolMachinesService tmToolMachinesService; private ITmToolMachinesService tmToolMachinesService;
...@@ -56,6 +60,17 @@ public class MdWorkunitController extends BaseController { ...@@ -56,6 +60,17 @@ public class MdWorkunitController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询产线列表
*/
@ApiOperation(value = "查询产线列表")
@PreAuthorize("@ss.hasPermi('md:workunit:list')")
@GetMapping("/selectGroupLineName")
public AjaxResult<List<String>> selectGroupLineName() {
List<String> list = itemService.selectGroupLineName();
return AjaxResult.success(list);
}
/** /**
* 弹窗 * 弹窗
......
...@@ -45,6 +45,9 @@ public class MdItem extends BaseEntity { ...@@ -45,6 +45,9 @@ public class MdItem extends BaseEntity {
@Excel(name = "物料/产品", type = Excel.Type.ALL) @Excel(name = "物料/产品", type = Excel.Type.ALL)
private String itemOrProduct; private String itemOrProduct;
@ApiModelProperty(value = "所属产线")
private String lineName;
private Long itemTypeId; private Long itemTypeId;
private String itemTypeCode; private String itemTypeCode;
......
...@@ -38,8 +38,6 @@ public class MdWorkunit extends BaseEntity { ...@@ -38,8 +38,6 @@ public class MdWorkunit extends BaseEntity {
@ApiModelProperty("工作中心编码") @ApiModelProperty("工作中心编码")
private Long workstationId; private Long workstationId;
/** /**
* 工作站编码 * 工作站编码
*/ */
...@@ -71,6 +69,11 @@ public class MdWorkunit extends BaseEntity { ...@@ -71,6 +69,11 @@ public class MdWorkunit extends BaseEntity {
@ApiModelProperty("工作单元名称") @ApiModelProperty("工作单元名称")
private String workunitName; private String workunitName;
@ApiModelProperty("机台顺序")
private Integer serial;
@ApiModelProperty("所属产线名")
private Integer lineName;
/** /**
* 是否故障 * 是否故障
......
...@@ -144,4 +144,12 @@ public interface MdItemMapper extends BaseMapper<MdItem> { ...@@ -144,4 +144,12 @@ public interface MdItemMapper extends BaseMapper<MdItem> {
@Select("select * from md_item ${ew.customSqlSegment}") @Select("select * from md_item ${ew.customSqlSegment}")
List<MdItem> selectListByQw(@Param("ew") QueryWrapper<MdItem> query); List<MdItem> selectListByQw(@Param("ew") QueryWrapper<MdItem> query);
/**
* 分组查询产线列表
*
* @return
*/
@Select(value = "select line_name from md_item group by line_name")
List<String> selectGroupLineName();
} }
...@@ -132,5 +132,7 @@ public interface IMdItemService { ...@@ -132,5 +132,7 @@ public interface IMdItemService {
* 初始同步新增ERP数据 * 初始同步新增ERP数据
*/ */
void initSyncAddErpData(); void initSyncAddErpData();
List<String> selectGroupLineName();
} }
...@@ -611,4 +611,9 @@ public class MdItemServiceImpl implements IMdItemService { ...@@ -611,4 +611,9 @@ public class MdItemServiceImpl implements IMdItemService {
throw new ServiceException(rst.getErrorMessage()); throw new ServiceException(rst.getErrorMessage());
} }
} }
@Override
public List<String> selectGroupLineName() {
return mdItemMapper.selectGroupLineName();
}
} }
...@@ -47,8 +47,8 @@ public class MdWorkunitVo extends BaseEntity { ...@@ -47,8 +47,8 @@ public class MdWorkunitVo extends BaseEntity {
@Excel(name = "工作站名称") @Excel(name = "工作站名称")
private String workstationName; private String workstationName;
@ApiModelProperty("机台顺序")
// private String wsName; private Integer serial;
/** /**
* 工作站编码 * 工作站编码
......
...@@ -430,6 +430,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService { ...@@ -430,6 +430,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
} }
proWorkorder.setStatus(WorkorderStatusEnum.CLOSE.getValue()); proWorkorder.setStatus(WorkorderStatusEnum.CLOSE.getValue());
this.updateWorkorderState(proWorkorder, WorkorderStatusEnum.CLOSE);
return this.updateProWorkorder(proWorkorder); return this.updateProWorkorder(proWorkorder);
} }
...@@ -1618,8 +1619,8 @@ public class ProWorkorderServiceImpl implements IProWorkorderService { ...@@ -1618,8 +1619,8 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
String workorderCode = proWorkorder.getWorkorderCode(); String workorderCode = proWorkorder.getWorkorderCode();
String arrangeCode = proWorkorder.getArrangeCode(); String arrangeCode = proWorkorder.getArrangeCode();
QueryWrapper<ProTask> taskQueryWrapper = new QueryWrapper<>(); QueryWrapper<ProTask> taskQueryWrapper = new QueryWrapper<>();
taskQueryWrapper.eq(arrangeCode != null, "t3.arrange_code", arrangeCode); taskQueryWrapper.eq(arrangeCode != null, "t2.arrange_code", arrangeCode);
taskQueryWrapper.eq(workorderCode != null, "t3.workorder_code", workorderCode); taskQueryWrapper.eq(workorderCode != null, "t2.workorder_code", workorderCode);
taskQueryWrapper.notIn("t1.status", statusSet); taskQueryWrapper.notIn("t1.status", statusSet);
List<ProTaskVo> proTaskVos = proTaskService.selectProTaskJoinWorkorder(taskQueryWrapper); List<ProTaskVo> proTaskVos = proTaskService.selectProTaskJoinWorkorder(taskQueryWrapper);
......
...@@ -21,7 +21,7 @@ public class WorkorderStateUpdateProcess implements IExtendedProcess { ...@@ -21,7 +21,7 @@ public class WorkorderStateUpdateProcess implements IExtendedProcess {
ProWorkorderStateUpdate stateUpdate = new ProWorkorderStateUpdate(); ProWorkorderStateUpdate stateUpdate = new ProWorkorderStateUpdate();
stateUpdate.setWorkorderCode(workorder.getWorkorderCode()); stateUpdate.setWorkorderCode(workorder.getWorkorderCode());
stateUpdate.setWorkorderType(workorder.getWorkorderType()); stateUpdate.setWorkorderType(workorder.getWorkorderType());
if(workorderStatusEnum==WorkorderStatusEnum.FINISHED){ if(workorderStatusEnum==WorkorderStatusEnum.CLOSE){
stateUpdate.setState("y"); stateUpdate.setState("y");
erpService.updateWorkorderState(stateUpdate); erpService.updateWorkorderState(stateUpdate);
}else if(workorderStatusEnum==WorkorderStatusEnum.PRODUCING){ }else if(workorderStatusEnum==WorkorderStatusEnum.PRODUCING){
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<result property="attr2" column="attr2"/> <result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/> <result property="attr3" column="attr3"/>
<result property="attr4" column="attr4"/> <result property="attr4" column="attr4"/>
<result property="lineName" column="line_name"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
<result property="attr2" column="attr2"/> <result property="attr2" column="attr2"/>
<result property="attr3" column="attr3"/> <result property="attr3" column="attr3"/>
<result property="attr4" column="attr4"/> <result property="attr4" column="attr4"/>
<result property="lineName" column="line_name"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/> <result property="updateBy" column="update_by"/>
...@@ -257,6 +259,7 @@ ...@@ -257,6 +259,7 @@
<if test="attr2 != null">attr2,</if> <if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if> <if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if> <if test="attr4 != null">attr4,</if>
<if test="lineName != null">line_name,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
...@@ -293,6 +296,7 @@ ...@@ -293,6 +296,7 @@
<if test="attr2 != null">#{attr2},</if> <if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if> <if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if> <if test="attr4 != null">#{attr4},</if>
<if test="lineName != null">#{lineName},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
...@@ -333,6 +337,7 @@ ...@@ -333,6 +337,7 @@
<if test="attr2 !=null and attr2 !=''">attr2=#{attr2},</if> <if test="attr2 !=null and attr2 !=''">attr2=#{attr2},</if>
<if test="attr3 !=null and attr3 !=0">attr3=#{attr3},</if> <if test="attr3 !=null and attr3 !=0">attr3=#{attr3},</if>
<if test="attr4 !=null and attr4 !=0">attr4=#{attr4},</if> <if test="attr4 !=null and attr4 !=0">attr4=#{attr4},</if>
<if test="lineName !=null and lineName !=''">line_name=#{lineName},</if>
<if test="updateBy !=null and updateBy !=''">update_by=#{updateBy},</if> <if test="updateBy !=null and updateBy !=''">update_by=#{updateBy},</if>
<if test="itemEnglishName !=null and itemEnglishName !=''">item_english_name = #{itemEnglishName},</if> <if test="itemEnglishName !=null and itemEnglishName !=''">item_english_name = #{itemEnglishName},</if>
<if test="itemNo !=null and itemNo !=''">item_no = #{itemNo},</if> <if test="itemNo !=null and itemNo !=''">item_no = #{itemNo},</if>
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
<result property="workstationId" column="workstation_id"/> <result property="workstationId" column="workstation_id"/>
<result property="workunitCode" column="workunit_code"/> <result property="workunitCode" column="workunit_code"/>
<result property="workunitName" column="workunit_name"/> <result property="workunitName" column="workunit_name"/>
<result property="serial" column="serial"/>
<result property="lineName" column="line_name"/>
<result property="enableFlag" column="enable_flag"/> <result property="enableFlag" column="enable_flag"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
...@@ -42,6 +44,8 @@ ...@@ -42,6 +44,8 @@
<result property="workstationId" column="workstation_id"/> <result property="workstationId" column="workstation_id"/>
<result property="workunitCode" column="workunit_code"/> <result property="workunitCode" column="workunit_code"/>
<result property="workunitName" column="workunit_name"/> <result property="workunitName" column="workunit_name"/>
<result property="serial" column="serial"/>
<result property="lineName" column="line_name"/>
<result property="enableFlag" column="enable_flag"/> <result property="enableFlag" column="enable_flag"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
...@@ -84,6 +88,8 @@ ...@@ -84,6 +88,8 @@
workstation_code, workstation_code,
workunit_code, workunit_code,
workunit_name, workunit_name,
serial,
line_name,
fault_flag, fault_flag,
enable_flag, enable_flag,
remark, remark,
...@@ -120,6 +126,8 @@ ...@@ -120,6 +126,8 @@
w.workunit_name, w.workunit_name,
ws.workstation_code, ws.workstation_code,
ws.workstation_name, ws.workstation_name,
ws.line_name,
ws.serial,
w.fault_flag, w.fault_flag,
w.enable_flag, w.enable_flag,
w.remark, w.remark,
...@@ -227,6 +235,8 @@ ...@@ -227,6 +235,8 @@
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workunitCode != null">workunit_code,</if> <if test="workunitCode != null">workunit_code,</if>
<if test="workunitName != null">workunit_name,</if> <if test="workunitName != null">workunit_name,</if>
<if test="serial != null">serial,</if>
<if test="lineName != null">line_name,</if>
<if test="enableFlag != null">enable_flag,</if> <if test="enableFlag != null">enable_flag,</if>
<if test="faultFlag != null">fault_flag,</if> <if test="faultFlag != null">fault_flag,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
...@@ -247,6 +257,8 @@ ...@@ -247,6 +257,8 @@
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workunitCode != null">#{workunitCode},</if> <if test="workunitCode != null">#{workunitCode},</if>
<if test="workunitName != null">#{workunitName},</if> <if test="workunitName != null">#{workunitName},</if>
<if test="serial != null">#{serial},</if>
<if test="lineName != null">#{lineName},</if>
<if test="enableFlag != null">#{enableFlag},</if> <if test="enableFlag != null">#{enableFlag},</if>
<if test="faultFlag != null">#{faultFlag},</if> <if test="faultFlag != null">#{faultFlag},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
...@@ -273,6 +285,8 @@ ...@@ -273,6 +285,8 @@
<if test="workstationId != null">workstation_id = #{workstationId},</if> <if test="workstationId != null">workstation_id = #{workstationId},</if>
<if test="workunitCode != null">workunit_code = #{workunitCode},</if> <if test="workunitCode != null">workunit_code = #{workunitCode},</if>
<if test="workunitName != null">workunit_name = #{workunitName},</if> <if test="workunitName != null">workunit_name = #{workunitName},</if>
<if test="serial != null">serial = #{serial},</if>
<if test="lineName != null">line_name = #{lineName},</if>
<if test="enableFlag != null">enable_flag = #{enableFlag},</if> <if test="enableFlag != null">enable_flag = #{enableFlag},</if>
<if test="faultFlag != null">fault_flag=#{faultFlag},</if> <if test="faultFlag != null">fault_flag=#{faultFlag},</if>
<if test="remark != null">remark = #{remark},</if> <if test="remark != null">remark = #{remark},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment