forked from I3-YF/i3plus-mes-pcn-yfai
1、单据作业增加关闭原因、关闭时间、关闭操作人员
2、返修增加维修明细时维修判定枚举更改为页面维护,涉及修改查询报表:修理品票明细报表、维修记录报表;(工程不良报表影响最大,修改大,暂不修改)tags/yfai-pcn-ext-v1.0
parent
2f5453ae49
commit
68956fd344
@ -0,0 +1,27 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.api.base.jx;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.bean.MesRepairJudgeType;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IRepairJudgeService {
|
||||
|
||||
/**
|
||||
* 获取维修判定类型信息集合
|
||||
* @param organizeCode 组织代码
|
||||
* @return 维修判定类型信息集合
|
||||
*/
|
||||
@ApiOperation(value = "获取维修判定类型信息集合", notes = "获取维修判定类型信息集合")
|
||||
List<MesRepairJudgeType> queryRepairJudgeList(String organizeCode);
|
||||
|
||||
/**
|
||||
* 获取维修判定类型信息集合
|
||||
* @param organizeCode 组织代码
|
||||
* @return 维修判定类型信息集合
|
||||
*/
|
||||
@ApiOperation(value = "获取维修判定类型信息集合", notes = "获取维修判定类型信息集合")
|
||||
Map<String, String> queryRepairJudgeMap(String organizeCode);
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base.jx;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.jx.IRepairJudgeService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.impp.framework.base.controller.MesBaseController;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
||||
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @PROJECT_NAME: i3plus-mes-panasonic-jx
|
||||
* @DESCRIPTION:
|
||||
* @USER: xinwang.yi
|
||||
* @DATE: 2023-11-13 14:50
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(MesPcnExtConstWords.BASE_URL_MES_PCN_JX + "/repair-judge-type")
|
||||
@Api(tags = "维修判定类型 Controller")
|
||||
public class RepairJudgeController extends MesBaseController {
|
||||
|
||||
@Autowired
|
||||
private IRepairJudgeService repairJudgeService;
|
||||
|
||||
@GetMapping(value = "/query")
|
||||
@ApiOperation(value = "按条件分页查询业务配置信息")
|
||||
public ResultBean queryRepairJudgeList(String organizeCode) {
|
||||
try {
|
||||
return ResultBean.success("查询成功").setResultList(repairJudgeService.queryRepairJudgeList(organizeCode))
|
||||
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||
} catch (ImppBusiException busExcep) {
|
||||
return ResultBean.fail(busExcep);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base.jx;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.api.base.jx.IRepairJudgeService;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.bean.MesRepairJudgeType;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.repository.MesRepairJudgeTypeRepository;
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtConstWords;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @PROJECT_NAME: i3plus-mes-panasonic-jx
|
||||
* @DESCRIPTION:
|
||||
* @USER: xinwang.yi
|
||||
* @DATE: 2023-11-13 14:48
|
||||
*/
|
||||
@Service
|
||||
public class RepairJudgeService implements IRepairJudgeService {
|
||||
|
||||
@Autowired
|
||||
private MesRepairJudgeTypeRepository repairJudgeTypeRepository;
|
||||
|
||||
@Override
|
||||
public List<MesRepairJudgeType> queryRepairJudgeList(String organizeCode) {
|
||||
|
||||
return repairJudgeTypeRepository.findByProperty(
|
||||
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID},
|
||||
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue()},
|
||||
"order by seq asc");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryRepairJudgeMap(String organizeCode) {
|
||||
List<MesRepairJudgeType> mesRepairJudgeTypes = queryRepairJudgeList(organizeCode);
|
||||
return CollectionUtils.isEmpty(mesRepairJudgeTypes) ? null :
|
||||
mesRepairJudgeTypes.stream().collect(Collectors.toMap(
|
||||
MesRepairJudgeType::getRepairJudgeCode, MesRepairJudgeType::getRepairJudgeName, (x,y) -> y));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.pojo.bean;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.ColumnDefault;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @PROJECT_NAME: i3plus-mes-panasonic-jx
|
||||
* @DESCRIPTION: 维修判定类型
|
||||
* @USER: xinwang.yi
|
||||
* @DATE: 2023-11-13 11:45
|
||||
*/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name = "MES_REPAIR_JUDGE_TYPE", indexes = {
|
||||
@Index(columnList = "REPAIR_JUDGE")
|
||||
})
|
||||
@Api("维修判定类型")
|
||||
public class MesRepairJudgeType extends BaseBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2795798399799053490L;
|
||||
|
||||
@Column(name = "REPAIR_JUDGE_CODE")
|
||||
@ApiParam("维修判定代码")
|
||||
private String repairJudgeCode;
|
||||
|
||||
@Column(name = "REPAIR_JUDGE_NAME")
|
||||
@ApiParam("维修判定名称")
|
||||
private String repairJudgeName;
|
||||
|
||||
@Column(name = "SEQ")
|
||||
@ApiParam("排序")
|
||||
private String seq;
|
||||
|
||||
@Column(name = "SYSTEM_SYNC_STATUS")
|
||||
@ColumnDefault("2")
|
||||
@ApiParam(value = "系统同步标志")
|
||||
public Integer systemSyncStatus = 2;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package cn.estsh.i3plus.ext.mes.pcn.pojo.repository;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.pcn.pojo.bean.MesRepairJudgeType;
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author xinwang.yi
|
||||
* @version 1.0
|
||||
* @date 2023/11/13 9:17
|
||||
**/
|
||||
@Repository
|
||||
public interface MesRepairJudgeTypeRepository extends BaseRepository<MesRepairJudgeType, Long> {
|
||||
|
||||
}
|
Loading…
Reference in New Issue