修改注解
This commit is contained in:
parent
e3d3a217c9
commit
9f17a97bbf
@ -2,11 +2,15 @@ package com.xkrs;
|
|||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@ComponentScan(basePackages = {"com.xkrs.model.entity", "com.xkrs.controller", "com.xkrs.service"})
|
//@ComponentScan(basePackages = {"com.xkrs.model.entity", "com.xkrs.controller", "com.xkrs.service"})
|
||||||
//@ComponentScan("com.xkrs.model.entity")
|
//@ComponentScan("com.xkrs.model.entity")
|
||||||
|
@Configuration
|
||||||
|
@EntityScan("com.xkrs.model.entity.*")
|
||||||
public class WordAndExcelApplication {
|
public class WordAndExcelApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
|||||||
|
|
||||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionDataSourceQo;
|
import com.xkrs.model.qo.QcInspectionDataSourceQo;
|
||||||
import com.xkrs.service.QcInspectionDataSourceService;
|
import com.xkrs.service.QcInspectionDataSourceService;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
@ -53,7 +53,7 @@ public class QcInspectionDataSourceController {
|
|||||||
String modelNo = inspectionDataSourceQo.getModelNo();
|
String modelNo = inspectionDataSourceQo.getModelNo();
|
||||||
String partNo = inspectionDataSourceQo.getPartNo();
|
String partNo = inspectionDataSourceQo.getPartNo();
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List<QcInspectionDataSource> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
List<QcInspectionDataSourceEntity> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||||
if (inspectionDataSources == null || inspectionDataSources.isEmpty()) {
|
if (inspectionDataSources == null || inspectionDataSources.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ public class QcInspectionDataSourceController {
|
|||||||
@GetMapping("/selectAllSource")
|
@GetMapping("/selectAllSource")
|
||||||
public String selectAllSource() {
|
public String selectAllSource() {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List<QcInspectionDataSource> dataSourceAll = inspectionDataSourceDao.findAll();
|
List<QcInspectionDataSourceEntity> dataSourceAll = inspectionDataSourceDao.findAll();
|
||||||
if (dataSourceAll.isEmpty()) {
|
if (dataSourceAll.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
|||||||
|
|
||||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionItemDictQo;
|
import com.xkrs.model.qo.QcInspectionItemDictQo;
|
||||||
import com.xkrs.service.QcInspectionItemDictService;
|
import com.xkrs.service.QcInspectionItemDictService;
|
||||||
import com.xkrs.util.Query;
|
import com.xkrs.util.Query;
|
||||||
@ -53,11 +53,11 @@ public class QcInspectionItemDictController {
|
|||||||
@GetMapping("/selectDataDict")
|
@GetMapping("/selectDataDict")
|
||||||
public String selectDataDict(@RequestParam("inspectionItemCode") String inspectionItemCode, @RequestParam("inspectionItemName") String inspectionItemName) {
|
public String selectDataDict(@RequestParam("inspectionItemCode") String inspectionItemCode, @RequestParam("inspectionItemName") String inspectionItemName) {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List<QcInspectionItemDict> qcInspectionItemDict = query.selectDataDict(inspectionItemCode, inspectionItemName);
|
List<QcInspectionItemDictEntity> qcInspectionItemDictEntity = query.selectDataDict(inspectionItemCode, inspectionItemName);
|
||||||
if (qcInspectionItemDict == null || qcInspectionItemDict.size() == 0) {
|
if (qcInspectionItemDictEntity == null || qcInspectionItemDictEntity.size() == 0) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时还没有该型号类型的字典信息!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时还没有该型号类型的字典信息!", locale);
|
||||||
}
|
}
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDict, locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDictEntity, locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -69,8 +69,8 @@ public class QcInspectionItemDictController {
|
|||||||
@GetMapping("/selectDataDictById")
|
@GetMapping("/selectDataDictById")
|
||||||
public String selectDataDictById(@RequestParam("id") Integer id) {
|
public String selectDataDictById(@RequestParam("id") Integer id) {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
QcInspectionItemDict qcInspectionItemDict = inspectionItemDictDao.findById(id);
|
QcInspectionItemDictEntity qcInspectionItemDictEntity = inspectionItemDictDao.findById(id);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDict, locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDictEntity, locale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
|||||||
|
|
||||||
import com.xkrs.dao.QcInspectionSpecDao;
|
import com.xkrs.dao.QcInspectionSpecDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionSpec;
|
import com.xkrs.model.entity.QcInspectionSpecEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionSpecQo;
|
import com.xkrs.model.qo.QcInspectionSpecQo;
|
||||||
import com.xkrs.service.QcInspectionSpecService;
|
import com.xkrs.service.QcInspectionSpecService;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
@ -45,7 +45,7 @@ public class QcInspectionSpecController {
|
|||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
String partNo = inspectionSpecQo.getPartNo();
|
String partNo = inspectionSpecQo.getPartNo();
|
||||||
String inspectionItemCode = inspectionSpecQo.getInspectionItemCode();
|
String inspectionItemCode = inspectionSpecQo.getInspectionItemCode();
|
||||||
List<QcInspectionSpec> inspectionSpecs = inspectionSpecDao.findByPartNoAndInspectionItemCode(partNo, inspectionItemCode);
|
List<QcInspectionSpecEntity> inspectionSpecs = inspectionSpecDao.findByPartNoAndInspectionItemCode(partNo, inspectionItemCode);
|
||||||
if (inspectionSpecs == null || inspectionSpecs.isEmpty()) {
|
if (inspectionSpecs == null || inspectionSpecs.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的规格信息!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的规格信息!", locale);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.xkrs.dao;
|
package com.xkrs.dao;
|
||||||
|
|
||||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface QcInspectionDataSourceDao extends JpaRepository<QcInspectionDataSource, Long>, JpaSpecificationExecutor<QcInspectionDataSource> {
|
public interface QcInspectionDataSourceDao extends JpaRepository<QcInspectionDataSourceEntity, Long>, JpaSpecificationExecutor<QcInspectionDataSourceEntity> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质检数据源
|
* 查询质检数据源
|
||||||
@ -22,6 +22,6 @@ public interface QcInspectionDataSourceDao extends JpaRepository<QcInspectionDat
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Query(value = "select * from qc_inspection_data_source where lot_no = ? and machine_no = ? and material_no = ? and model_no = ? and part_no = ?",nativeQuery = true)
|
@Query(value = "select * from qc_inspection_data_source where lot_no = ? and machine_no = ? and material_no = ? and model_no = ? and part_no = ?",nativeQuery = true)
|
||||||
List<QcInspectionDataSource> selectDataSource(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
List<QcInspectionDataSourceEntity> selectDataSource(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
package com.xkrs.dao;
|
package com.xkrs.dao;
|
||||||
|
|
||||||
import com.xkrs.model.entity.QcInspectionFile;
|
import com.xkrs.model.entity.QcInspectionFileEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
* @Date: 2022/1/20 15:23
|
* @Date: 2022/1/20 15:23
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface QcInspectionFileDao extends JpaRepository<QcInspectionFile, Long>, JpaSpecificationExecutor<QcInspectionFile> {
|
public interface QcInspectionFileDao extends JpaRepository<QcInspectionFileEntity, Long>, JpaSpecificationExecutor<QcInspectionFileEntity> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询文件信息
|
* 查询文件信息
|
||||||
@ -27,7 +27,7 @@ public interface QcInspectionFileDao extends JpaRepository<QcInspectionFile, Lon
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Query(value = "select * from qc_inspection_file where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5", nativeQuery = true)
|
@Query(value = "select * from qc_inspection_file where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5", nativeQuery = true)
|
||||||
List<QcInspectionFile> selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
List<QcInspectionFileEntity> selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改模板上传信息
|
* 修改模板上传信息
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.xkrs.dao;
|
package com.xkrs.dao;
|
||||||
|
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
@ -8,7 +8,7 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface QcInspectionItemDictDao extends JpaRepository<QcInspectionItemDict, Long>, JpaSpecificationExecutor<QcInspectionItemDict> {
|
public interface QcInspectionItemDictDao extends JpaRepository<QcInspectionItemDictEntity, Long>, JpaSpecificationExecutor<QcInspectionItemDictEntity> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过检验项代码查询字典表的数据
|
* 通过检验项代码查询字典表的数据
|
||||||
@ -16,7 +16,7 @@ public interface QcInspectionItemDictDao extends JpaRepository<QcInspectionItemD
|
|||||||
* @param inspectionItemCode
|
* @param inspectionItemCode
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
QcInspectionItemDict findByInspectionItemCode(String inspectionItemCode);
|
QcInspectionItemDictEntity findByInspectionItemCode(String inspectionItemCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询字典信息
|
* 根据id查询字典信息
|
||||||
@ -24,7 +24,7 @@ public interface QcInspectionItemDictDao extends JpaRepository<QcInspectionItemD
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
QcInspectionItemDict findById(Integer id);
|
QcInspectionItemDictEntity findById(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id修改字典的信息
|
* 根据id修改字典的信息
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.xkrs.dao;
|
package com.xkrs.dao;
|
||||||
|
|
||||||
import com.xkrs.model.entity.QcInspectionPicture;
|
import com.xkrs.model.entity.QcInspectionPictureEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
@ -10,7 +10,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface QcInspectionPictureDao extends JpaRepository<QcInspectionPicture, Long>, JpaSpecificationExecutor<QcInspectionPicture> {
|
public interface QcInspectionPictureDao extends JpaRepository<QcInspectionPictureEntity, Long>, JpaSpecificationExecutor<QcInspectionPictureEntity> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询图片信息
|
* 查询图片信息
|
||||||
@ -23,7 +23,7 @@ public interface QcInspectionPictureDao extends JpaRepository<QcInspectionPictur
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Query(value = "select * from qc_inspection_picture where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5",nativeQuery = true)
|
@Query(value = "select * from qc_inspection_picture where lot_no = ?1 and machine_no = ?2 and material_no = ?3 and model_no = ?4 and part_no = ?5",nativeQuery = true)
|
||||||
List<QcInspectionPicture> selectPicture(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
List<QcInspectionPictureEntity> selectPicture(String lotNo, String machineNo, String materialNo, String modelNo, String partNo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改图片路径信息
|
* 修改图片路径信息
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.xkrs.dao;
|
package com.xkrs.dao;
|
||||||
|
|
||||||
import com.xkrs.model.entity.QcInspectionSpec;
|
import com.xkrs.model.entity.QcInspectionSpecEntity;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface QcInspectionSpecDao extends JpaRepository<QcInspectionSpec, Long>, JpaSpecificationExecutor<QcInspectionSpec> {
|
public interface QcInspectionSpecDao extends JpaRepository<QcInspectionSpecEntity, Long>, JpaSpecificationExecutor<QcInspectionSpecEntity> {
|
||||||
|
|
||||||
List<QcInspectionSpec> findByPartNoAndInspectionItemCode(String partNo, String inspectionItemCode);
|
List<QcInspectionSpecEntity> findByPartNoAndInspectionItemCode(String partNo, String inspectionItemCode);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "qc_inspection_data_source")
|
@Table(name = "qc_inspection_data_source")
|
||||||
public class QcInspectionDataSource implements Serializable {
|
public class QcInspectionDataSourceEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采集数据编号
|
* 采集数据编号
|
||||||
@ -59,7 +59,7 @@ public class QcInspectionDataSource implements Serializable {
|
|||||||
@Column(length = 85, columnDefinition = "varchar(85)")
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
private String inspectValue;
|
private String inspectValue;
|
||||||
|
|
||||||
public QcInspectionDataSource() {
|
public QcInspectionDataSourceEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
@ -128,6 +128,6 @@ public class QcInspectionDataSource implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QcInspectionDataSource{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", inspectionItemCode='" + inspectionItemCode + '\'' + ", inspectValue='" + inspectValue + '\'' + '}';
|
return "QcInspectionDataSourceEntity{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", inspectionItemCode='" + inspectionItemCode + '\'' + ", inspectValue='" + inspectValue + '\'' + '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,7 +5,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "file")
|
@Table(name = "file")
|
||||||
public class QcInspectionFile implements Serializable {
|
public class QcInspectionFileEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编号
|
* 编号
|
||||||
@ -56,7 +56,7 @@ public class QcInspectionFile implements Serializable {
|
|||||||
@Column(length = 85, columnDefinition = "varchar(85)")
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
public QcInspectionFile() {
|
public QcInspectionFileEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
@ -125,7 +125,7 @@ public class QcInspectionFile implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QcInspectionFile{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", templatePath='" + templatePath + '\'' + ", filePath='" + filePath + '\'' + '}';
|
return "QcInspectionFileEntity{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", templatePath='" + templatePath + '\'' + ", filePath='" + filePath + '\'' + '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -17,7 +17,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "qc_inspection_item_dict")
|
@Table(name = "qc_inspection_item_dict")
|
||||||
public class QcInspectionItemDict implements Serializable {
|
public class QcInspectionItemDictEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 索引
|
* 索引
|
||||||
@ -38,10 +38,10 @@ public class QcInspectionItemDict implements Serializable {
|
|||||||
@Column(length = 85, columnDefinition = "varchar(85)")
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
private String inspectionItemName;
|
private String inspectionItemName;
|
||||||
|
|
||||||
public QcInspectionItemDict() {
|
public QcInspectionItemDictEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public QcInspectionItemDict(Integer id, String inspectionItemCode, String inspectionItemName) {
|
public QcInspectionItemDictEntity(Integer id, String inspectionItemCode, String inspectionItemName) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.inspectionItemCode = inspectionItemCode;
|
this.inspectionItemCode = inspectionItemCode;
|
||||||
this.inspectionItemName = inspectionItemName;
|
this.inspectionItemName = inspectionItemName;
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "qc_inspection_picture")
|
@Table(name = "qc_inspection_picture")
|
||||||
public class QcInspectionPicture implements Serializable {
|
public class QcInspectionPictureEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编号
|
* 编号
|
||||||
@ -53,7 +53,7 @@ public class QcInspectionPicture implements Serializable {
|
|||||||
@Column(length = 85, columnDefinition = "varchar(85)")
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
private String picturePath;
|
private String picturePath;
|
||||||
|
|
||||||
public QcInspectionPicture() {
|
public QcInspectionPictureEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
@ -114,7 +114,7 @@ public class QcInspectionPicture implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QcInspectionPicture{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", picturePath='" + picturePath + '\'' + '}';
|
return "QcInspectionPictureEntity{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", partNo='" + partNo + '\'' + ", picturePath='" + picturePath + '\'' + '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "qc_inspection_spec")
|
@Table(name = "qc_inspection_spec")
|
||||||
public class QcInspectionSpec implements Serializable {
|
public class QcInspectionSpecEntity implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格编号
|
* 规格编号
|
||||||
@ -71,7 +71,7 @@ public class QcInspectionSpec implements Serializable {
|
|||||||
@Column(length = 85, columnDefinition = "varchar(85)")
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
public QcInspectionSpec() {
|
public QcInspectionSpecEntity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
@ -156,7 +156,7 @@ public class QcInspectionSpec implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "QcInspectionSpec{" +
|
return "QcInspectionSpecEntity{" +
|
||||||
"id=" + id +
|
"id=" + id +
|
||||||
", partNo='" + partNo + '\'' +
|
", partNo='" + partNo + '\'' +
|
||||||
", inspectionItemCode='" + inspectionItemCode + '\'' +
|
", inspectionItemCode='" + inspectionItemCode + '\'' +
|
@ -3,8 +3,8 @@ package com.xkrs.service.impl;
|
|||||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionDataSourceQo;
|
import com.xkrs.model.qo.QcInspectionDataSourceQo;
|
||||||
import com.xkrs.service.QcInspectionDataSourceService;
|
import com.xkrs.service.QcInspectionDataSourceService;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
@ -37,22 +37,22 @@ public class QcInspectionDataSourceServiceImpl implements QcInspectionDataSource
|
|||||||
@Override
|
@Override
|
||||||
public String insertDataSource(QcInspectionDataSourceQo inspectionDataSourceQo) {
|
public String insertDataSource(QcInspectionDataSourceQo inspectionDataSourceQo) {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
QcInspectionItemDict byInspectionItemCode = inspectionItemDictDao.findByInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
QcInspectionItemDictEntity byInspectionItemCode = inspectionItemDictDao.findByInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||||
if (byInspectionItemCode == null) {
|
if (byInspectionItemCode == null) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该字典类型!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该字典类型!", locale);
|
||||||
}
|
}
|
||||||
QcInspectionDataSource qcInspectionDataSource = new QcInspectionDataSource();
|
QcInspectionDataSourceEntity qcInspectionDataSourceEntity = new QcInspectionDataSourceEntity();
|
||||||
if (inspectionDataSourceQo.getId() > 0) {
|
if (inspectionDataSourceQo.getId() > 0) {
|
||||||
qcInspectionDataSource.setId(inspectionDataSourceQo.getId());
|
qcInspectionDataSourceEntity.setId(inspectionDataSourceQo.getId());
|
||||||
}
|
}
|
||||||
qcInspectionDataSource.setLotNo(inspectionDataSourceQo.getLotNo());
|
qcInspectionDataSourceEntity.setLotNo(inspectionDataSourceQo.getLotNo());
|
||||||
qcInspectionDataSource.setMachineNo(inspectionDataSourceQo.getMachineNo());
|
qcInspectionDataSourceEntity.setMachineNo(inspectionDataSourceQo.getMachineNo());
|
||||||
qcInspectionDataSource.setMaterialNo(inspectionDataSourceQo.getMaterialNo());
|
qcInspectionDataSourceEntity.setMaterialNo(inspectionDataSourceQo.getMaterialNo());
|
||||||
qcInspectionDataSource.setModelNo(inspectionDataSourceQo.getModelNo());
|
qcInspectionDataSourceEntity.setModelNo(inspectionDataSourceQo.getModelNo());
|
||||||
qcInspectionDataSource.setPartNo(inspectionDataSourceQo.getPartNo());
|
qcInspectionDataSourceEntity.setPartNo(inspectionDataSourceQo.getPartNo());
|
||||||
qcInspectionDataSource.setInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
qcInspectionDataSourceEntity.setInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||||
qcInspectionDataSource.setInspectValue(inspectionDataSourceQo.getInspectValue());
|
qcInspectionDataSourceEntity.setInspectValue(inspectionDataSourceQo.getInspectValue());
|
||||||
inspectionDataSourceDao.save(qcInspectionDataSource);
|
inspectionDataSourceDao.save(qcInspectionDataSourceEntity);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@ package com.xkrs.service.impl;
|
|||||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||||
import com.xkrs.dao.QcInspectionFileDao;
|
import com.xkrs.dao.QcInspectionFileDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||||
import com.xkrs.model.entity.QcInspectionFile;
|
import com.xkrs.model.entity.QcInspectionFileEntity;
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionFileQo;
|
import com.xkrs.model.qo.QcInspectionFileQo;
|
||||||
import com.xkrs.service.QcInspectionFileService;
|
import com.xkrs.service.QcInspectionFileService;
|
||||||
import com.xkrs.util.ExcelUploadUtil;
|
import com.xkrs.util.ExcelUploadUtil;
|
||||||
@ -36,7 +36,7 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
|||||||
private QcInspectionFileDao inspectionFileDao;
|
private QcInspectionFileDao inspectionFileDao;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private QcInspectionItemDict inspectionItemDict;
|
private QcInspectionItemDictEntity inspectionItemDict;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private QcInspectionDataSourceDao inspectionDataSourceDao;
|
private QcInspectionDataSourceDao inspectionDataSourceDao;
|
||||||
@ -55,15 +55,15 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
|||||||
String modelNo = inspectionFileQo.getModelNo();
|
String modelNo = inspectionFileQo.getModelNo();
|
||||||
String partNo = inspectionFileQo.getPartNo();
|
String partNo = inspectionFileQo.getPartNo();
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List<QcInspectionFile> qcInspectionFiles = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
List<QcInspectionFileEntity> qcInspectionFileEntities = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||||
if (qcInspectionFiles != null || qcInspectionFiles.isEmpty()) {
|
if (qcInspectionFileEntities != null || qcInspectionFileEntities.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "已存在该产品的模板!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "已存在该产品的模板!", locale);
|
||||||
}
|
}
|
||||||
if (fileExcel == null) {
|
if (fileExcel == null) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "模板不能为空!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "模板不能为空!", locale);
|
||||||
}
|
}
|
||||||
String file = ExcelUploadUtil.memoryFile(fileExcel);
|
String file = ExcelUploadUtil.memoryFile(fileExcel);
|
||||||
QcInspectionFile fileEntity = new QcInspectionFile();
|
QcInspectionFileEntity fileEntity = new QcInspectionFileEntity();
|
||||||
fileEntity.setId(inspectionFileQo.getId());
|
fileEntity.setId(inspectionFileQo.getId());
|
||||||
fileEntity.setLotNo(lotNo);
|
fileEntity.setLotNo(lotNo);
|
||||||
fileEntity.setMachineNo(machineNo);
|
fileEntity.setMachineNo(machineNo);
|
||||||
@ -90,17 +90,17 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
|||||||
String modelNo = inspectionFileQo.getModelNo();
|
String modelNo = inspectionFileQo.getModelNo();
|
||||||
String partNo = inspectionFileQo.getPartNo();
|
String partNo = inspectionFileQo.getPartNo();
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
List<QcInspectionFile> qcInspectionFiles = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
List<QcInspectionFileEntity> qcInspectionFileEntities = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||||
if (qcInspectionFiles == null || qcInspectionFiles.isEmpty()) {
|
if (qcInspectionFileEntities == null || qcInspectionFileEntities.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的模板,请添加!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的模板,请添加!", locale);
|
||||||
}
|
}
|
||||||
String templatePath = qcInspectionFiles.get(0).getTemplatePath();
|
String templatePath = qcInspectionFileEntities.get(0).getTemplatePath();
|
||||||
List<QcInspectionDataSource> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
List<QcInspectionDataSourceEntity> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||||
if (inspectionDataSources == null || inspectionDataSources.isEmpty()) {
|
if (inspectionDataSources == null || inspectionDataSources.isEmpty()) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的信息!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的信息!", locale);
|
||||||
}
|
}
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
for (QcInspectionDataSource inspectionDataSource : inspectionDataSources) {
|
for (QcInspectionDataSourceEntity inspectionDataSource : inspectionDataSources) {
|
||||||
map.put(inspectionDataSource.getInspectionItemCode(), inspectionDataSource.getInspectValue());
|
map.put(inspectionDataSource.getInspectionItemCode(), inspectionDataSource.getInspectValue());
|
||||||
}
|
}
|
||||||
String fill = ExportExcel.exportToProveExcel(map, templatePath);
|
String fill = ExportExcel.exportToProveExcel(map, templatePath);
|
||||||
|
@ -2,7 +2,7 @@ package com.xkrs.service.impl;
|
|||||||
|
|
||||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionItemDictQo;
|
import com.xkrs.model.qo.QcInspectionItemDictQo;
|
||||||
import com.xkrs.service.QcInspectionItemDictService;
|
import com.xkrs.service.QcInspectionItemDictService;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
@ -32,14 +32,14 @@ public class QcInspectionItemDictServiceImpl implements QcInspectionItemDictServ
|
|||||||
@Override
|
@Override
|
||||||
public String insertDataDict(QcInspectionItemDictQo inspectionItemDictQo) {
|
public String insertDataDict(QcInspectionItemDictQo inspectionItemDictQo) {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
QcInspectionItemDict englishName = inspectionItemDictDao.findByInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
QcInspectionItemDictEntity englishName = inspectionItemDictDao.findByInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||||
if (englishName != null) {
|
if (englishName != null) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该产品变量已存在,请勿重复添加!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该产品变量已存在,请勿重复添加!", locale);
|
||||||
}
|
}
|
||||||
QcInspectionItemDict qcInspectionItemDict = new QcInspectionItemDict();
|
QcInspectionItemDictEntity qcInspectionItemDictEntity = new QcInspectionItemDictEntity();
|
||||||
qcInspectionItemDict.setInspectionItemName(inspectionItemDictQo.getInspectionItemName());
|
qcInspectionItemDictEntity.setInspectionItemName(inspectionItemDictQo.getInspectionItemName());
|
||||||
qcInspectionItemDict.setInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
qcInspectionItemDictEntity.setInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||||
inspectionItemDictDao.save(qcInspectionItemDict);
|
inspectionItemDictDao.save(qcInspectionItemDictEntity);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package com.xkrs.service.impl;
|
|||||||
|
|
||||||
import com.xkrs.dao.QcInspectionPictureDao;
|
import com.xkrs.dao.QcInspectionPictureDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionPicture;
|
import com.xkrs.model.entity.QcInspectionPictureEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionPictureQo;
|
import com.xkrs.model.qo.QcInspectionPictureQo;
|
||||||
import com.xkrs.service.QcInspectionPictureService;
|
import com.xkrs.service.QcInspectionPictureService;
|
||||||
import com.xkrs.util.ExcelUploadUtil;
|
import com.xkrs.util.ExcelUploadUtil;
|
||||||
@ -26,7 +26,7 @@ public class QcInspectionPictureServiceImpl implements QcInspectionPictureServic
|
|||||||
public String insertPicture(QcInspectionPictureQo inspectionPictureQo, MultipartFile pictureFile) throws IOException {
|
public String insertPicture(QcInspectionPictureQo inspectionPictureQo, MultipartFile pictureFile) throws IOException {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
String file = ExcelUploadUtil.memoryFile(pictureFile);
|
String file = ExcelUploadUtil.memoryFile(pictureFile);
|
||||||
QcInspectionPicture qcInspectionPicture = new QcInspectionPicture();
|
QcInspectionPictureEntity qcInspectionPicture = new QcInspectionPictureEntity();
|
||||||
qcInspectionPicture.setId(inspectionPictureQo.getId());
|
qcInspectionPicture.setId(inspectionPictureQo.getId());
|
||||||
qcInspectionPicture.setLotNo(inspectionPictureQo.getLotNo());
|
qcInspectionPicture.setLotNo(inspectionPictureQo.getLotNo());
|
||||||
qcInspectionPicture.setMachineNo(inspectionPictureQo.getMachineNo());
|
qcInspectionPicture.setMachineNo(inspectionPictureQo.getMachineNo());
|
||||||
|
@ -3,7 +3,7 @@ package com.xkrs.service.impl;
|
|||||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||||
import com.xkrs.dao.QcInspectionSpecDao;
|
import com.xkrs.dao.QcInspectionSpecDao;
|
||||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
import com.xkrs.model.entity.QcInspectionSpec;
|
import com.xkrs.model.entity.QcInspectionSpecEntity;
|
||||||
import com.xkrs.model.qo.QcInspectionSpecQo;
|
import com.xkrs.model.qo.QcInspectionSpecQo;
|
||||||
import com.xkrs.service.QcInspectionSpecService;
|
import com.xkrs.service.QcInspectionSpecService;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
@ -33,7 +33,7 @@ public class QcInspectionSpecServiceImpl implements QcInspectionSpecService {
|
|||||||
@Override
|
@Override
|
||||||
public String insertSpec(QcInspectionSpecQo inspectionSpecQo) {
|
public String insertSpec(QcInspectionSpecQo inspectionSpecQo) {
|
||||||
Locale locale = LocaleContextHolder.getLocale();
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
QcInspectionSpec inspectionSpec = new QcInspectionSpec();
|
QcInspectionSpecEntity inspectionSpec = new QcInspectionSpecEntity();
|
||||||
if (inspectionSpecQo.getId() > 0) {
|
if (inspectionSpecQo.getId() > 0) {
|
||||||
inspectionSpec.setId(inspectionSpecQo.getId());
|
inspectionSpec.setId(inspectionSpecQo.getId());
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.xkrs.util;
|
package com.xkrs.util;
|
||||||
|
|
||||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||||
import org.springframework.data.jpa.domain.Specification;
|
import org.springframework.data.jpa.domain.Specification;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@ -28,10 +28,10 @@ public class Query {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<QcInspectionItemDict> selectDataDict(String inspectionItemCode, String inspectionItemName) {
|
public List<QcInspectionItemDictEntity> selectDataDict(String inspectionItemCode, String inspectionItemName) {
|
||||||
Specification<QcInspectionItemDict> specification = new Specification<QcInspectionItemDict>() {
|
Specification<QcInspectionItemDictEntity> specification = new Specification<QcInspectionItemDictEntity>() {
|
||||||
@Override
|
@Override
|
||||||
public Predicate toPredicate(Root<QcInspectionItemDict> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
|
public Predicate toPredicate(Root<QcInspectionItemDictEntity> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
|
||||||
List<Predicate> list = new ArrayList<>();
|
List<Predicate> list = new ArrayList<>();
|
||||||
if (inspectionItemCode != null && !"".equals(inspectionItemCode)) {
|
if (inspectionItemCode != null && !"".equals(inspectionItemCode)) {
|
||||||
list.add(criteriaBuilder.equal(root.get("inspectionItemCode").as(String.class), inspectionItemCode));
|
list.add(criteriaBuilder.equal(root.get("inspectionItemCode").as(String.class), inspectionItemCode));
|
||||||
|
Loading…
Reference in New Issue
Block a user