Merge remote-tracking branch 'origin/uat-temp-wj-chongqingdaqu-dev-temp-logic-20250321-45820' into uat-temp-wj-chongqingdaqu-dev-bak

uat-temp-wj-chongqingdaqu-dev-bak
王杰 4 months ago
commit d0ca6a26eb

@ -35,4 +35,6 @@ public interface IMesNcProcessingService {
@ApiOperation(value = "NC处理") @ApiOperation(value = "NC处理")
void saveNc(MesNcProcessingInputModel model, String org, boolean isOrder); void saveNc(MesNcProcessingInputModel model, String org, boolean isOrder);
List<String> queryPartInspectionCreateUser(String organizeCode);
} }

@ -110,4 +110,18 @@ public class MesNcProcessingController {
} }
} }
@GetMapping("/query-part-inspection-create-user")
@ApiOperation(value = "查询检验人NC-零件检测-单据 表的createUser")
public ResultBean queryPartInspectionCreateUser(String organizeCode) {
try {
ValidatorBean.checkNotNull(organizeCode, "工厂不能为空");
return ResultBean.success("查询成功").setResultList(
ncProcessingService.queryPartInspectionCreateUser(organizeCode));
} catch (ImppBusiException imppException) {
return ResultBean.fail(imppException);
} catch (Exception e) {
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
}
}
} }

@ -14,4 +14,6 @@ public interface IMesNcProcessingDao {
@ApiOperation(value = "查询停工统计数据") @ApiOperation(value = "查询停工统计数据")
List<MesNcProcessingPartAndLotModel> queryDefectRecordByPager(String partNo, String lotNo, String org, Pager pager); List<MesNcProcessingPartAndLotModel> queryDefectRecordByPager(String partNo, String lotNo, String org, Pager pager);
List<String> queryPartInspectionCreateUser(String organizeCode);
} }

@ -3,10 +3,12 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.daoimpl;
import cn.estsh.i3plus.ext.mes.pcn.apiservice.dao.IMesNcProcessingDao; import cn.estsh.i3plus.ext.mes.pcn.apiservice.dao.IMesNcProcessingDao;
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingPartAndLotModel; import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesNcProcessingPartAndLotModel;
import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.i3plus.pojo.base.common.Pager;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
import javax.persistence.Query; import javax.persistence.Query;
@ -89,4 +91,23 @@ public class MesNcProcessingDao implements IMesNcProcessingDao {
return modelList; return modelList;
} }
@Override
public List<String> queryPartInspectionCreateUser(String organizeCode) {
String sql = "SELECT DISTINCT(create_user) " +
"FROM mes_part_inspection " +
"WHERE is_valid = :isValid AND is_deleted = :isDeleted AND organize_code = :organizeCode ";
Query query = entityManager.createNativeQuery(sql);
query.setParameter("isValid", CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
query.setParameter("isDeleted", CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
query.setParameter("organizeCode", organizeCode);
List resultList = query.getResultList();
log.info("queryPartInspectionCreateUser-查询结果-" + resultList);
if (CollectionUtils.isEmpty(resultList)) {
return null;
}else {
return (List<String>) resultList;
}
}
} }

@ -35,10 +35,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -139,7 +136,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue(), "inspectionStatus", packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean); DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue(), "ncStatus", packBean);
DdlPreparedPack.getNumEqualPack(partInspection.getRefundFlag(), "refundFlag", packBean); DdlPreparedPack.getNumEqualPack(partInspection.getRefundFlag(), "refundFlag", packBean);
DdlPreparedPack.getStringEqualPack(partInspection.getCreateUser(), "createUser", packBean);
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean); DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
pager = PagerHelper.getPager(pager, partInspectionRepository.findByHqlWhereCount(packBean)); pager = PagerHelper.getPager(pager, partInspectionRepository.findByHqlWhereCount(packBean));
@ -215,6 +212,11 @@ public class MesNcProcessingService implements IMesNcProcessingService {
} }
} }
@Override
public List<String> queryPartInspectionCreateUser(String organizeCode) {
return ncProcessingDao.queryPartInspectionCreateUser(organizeCode);
}
/** /**
* *
* *

Loading…
Cancel
Save