修改注解
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.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@SpringBootApplication
|
||||
//@ComponentScan(basePackages = {"com.xkrs.model.entity", "com.xkrs.controller", "com.xkrs.service"})
|
||||
//@ComponentScan("com.xkrs.model.entity")
|
||||
@Configuration
|
||||
@EntityScan("com.xkrs.model.entity.*")
|
||||
public class WordAndExcelApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
||||
|
||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||
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.service.QcInspectionDataSourceService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
@ -53,7 +53,7 @@ public class QcInspectionDataSourceController {
|
||||
String modelNo = inspectionDataSourceQo.getModelNo();
|
||||
String partNo = inspectionDataSourceQo.getPartNo();
|
||||
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()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
||||
}
|
||||
@ -68,7 +68,7 @@ public class QcInspectionDataSourceController {
|
||||
@GetMapping("/selectAllSource")
|
||||
public String selectAllSource() {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<QcInspectionDataSource> dataSourceAll = inspectionDataSourceDao.findAll();
|
||||
List<QcInspectionDataSourceEntity> dataSourceAll = inspectionDataSourceDao.findAll();
|
||||
if (dataSourceAll.isEmpty()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的测量信息!", locale);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
||||
|
||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||
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.service.QcInspectionItemDictService;
|
||||
import com.xkrs.util.Query;
|
||||
@ -53,11 +53,11 @@ public class QcInspectionItemDictController {
|
||||
@GetMapping("/selectDataDict")
|
||||
public String selectDataDict(@RequestParam("inspectionItemCode") String inspectionItemCode, @RequestParam("inspectionItemName") String inspectionItemName) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<QcInspectionItemDict> qcInspectionItemDict = query.selectDataDict(inspectionItemCode, inspectionItemName);
|
||||
if (qcInspectionItemDict == null || qcInspectionItemDict.size() == 0) {
|
||||
List<QcInspectionItemDictEntity> qcInspectionItemDictEntity = query.selectDataDict(inspectionItemCode, inspectionItemName);
|
||||
if (qcInspectionItemDictEntity == null || qcInspectionItemDictEntity.size() == 0) {
|
||||
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")
|
||||
public String selectDataDictById(@RequestParam("id") Integer id) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
QcInspectionItemDict qcInspectionItemDict = inspectionItemDictDao.findById(id);
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDict, locale);
|
||||
QcInspectionItemDictEntity qcInspectionItemDictEntity = inspectionItemDictDao.findById(id);
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, qcInspectionItemDictEntity, locale);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@ package com.xkrs.controller;
|
||||
|
||||
import com.xkrs.dao.QcInspectionSpecDao;
|
||||
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.service.QcInspectionSpecService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
@ -45,7 +45,7 @@ public class QcInspectionSpecController {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
String partNo = inspectionSpecQo.getPartNo();
|
||||
String inspectionItemCode = inspectionSpecQo.getInspectionItemCode();
|
||||
List<QcInspectionSpec> inspectionSpecs = inspectionSpecDao.findByPartNoAndInspectionItemCode(partNo, inspectionItemCode);
|
||||
List<QcInspectionSpecEntity> inspectionSpecs = inspectionSpecDao.findByPartNoAndInspectionItemCode(partNo, inspectionItemCode);
|
||||
if (inspectionSpecs == null || inspectionSpecs.isEmpty()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该零件的规格信息!", locale);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository;
|
||||
import java.util.List;
|
||||
|
||||
@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
|
||||
*/
|
||||
@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;
|
||||
|
||||
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.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
* @Date: 2022/1/20 15:23
|
||||
*/
|
||||
@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
|
||||
*/
|
||||
@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;
|
||||
|
||||
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.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
@ -8,7 +8,7 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.stereotype.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
|
||||
* @return
|
||||
*/
|
||||
QcInspectionItemDict findByInspectionItemCode(String inspectionItemCode);
|
||||
QcInspectionItemDictEntity findByInspectionItemCode(String inspectionItemCode);
|
||||
|
||||
/**
|
||||
* 根据id查询字典信息
|
||||
@ -24,7 +24,7 @@ public interface QcInspectionItemDictDao extends JpaRepository<QcInspectionItemD
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
QcInspectionItemDict findById(Integer id);
|
||||
QcInspectionItemDictEntity findById(Integer id);
|
||||
|
||||
/**
|
||||
* 根据id修改字典的信息
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
@ -10,7 +10,7 @@ import org.springframework.stereotype.Repository;
|
||||
import java.util.List;
|
||||
|
||||
@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
|
||||
*/
|
||||
@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;
|
||||
|
||||
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.JpaSpecificationExecutor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@ -8,7 +8,7 @@ import org.springframework.stereotype.Repository;
|
||||
import java.util.List;
|
||||
|
||||
@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
|
||||
@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)")
|
||||
private String inspectValue;
|
||||
|
||||
public QcInspectionDataSource() {
|
||||
public QcInspectionDataSourceEntity() {
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
@ -128,6 +128,6 @@ public class QcInspectionDataSource implements Serializable {
|
||||
|
||||
@Override
|
||||
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
|
||||
@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)")
|
||||
private String filePath;
|
||||
|
||||
public QcInspectionFile() {
|
||||
public QcInspectionFileEntity() {
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
@ -125,7 +125,7 @@ public class QcInspectionFile implements Serializable {
|
||||
|
||||
@Override
|
||||
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
|
||||
@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)")
|
||||
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.inspectionItemCode = inspectionItemCode;
|
||||
this.inspectionItemName = inspectionItemName;
|
@ -8,7 +8,7 @@ import java.io.Serializable;
|
||||
*/
|
||||
@Entity
|
||||
@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)")
|
||||
private String picturePath;
|
||||
|
||||
public QcInspectionPicture() {
|
||||
public QcInspectionPictureEntity() {
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
@ -114,7 +114,7 @@ public class QcInspectionPicture implements Serializable {
|
||||
|
||||
@Override
|
||||
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
|
||||
@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)")
|
||||
private String remark;
|
||||
|
||||
public QcInspectionSpec() {
|
||||
public QcInspectionSpecEntity() {
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
@ -156,7 +156,7 @@ public class QcInspectionSpec implements Serializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "QcInspectionSpec{" +
|
||||
return "QcInspectionSpecEntity{" +
|
||||
"id=" + id +
|
||||
", partNo='" + partNo + '\'' +
|
||||
", inspectionItemCode='" + inspectionItemCode + '\'' +
|
@ -3,8 +3,8 @@ package com.xkrs.service.impl;
|
||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
||||
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||
import com.xkrs.model.qo.QcInspectionDataSourceQo;
|
||||
import com.xkrs.service.QcInspectionDataSourceService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
@ -37,22 +37,22 @@ public class QcInspectionDataSourceServiceImpl implements QcInspectionDataSource
|
||||
@Override
|
||||
public String insertDataSource(QcInspectionDataSourceQo inspectionDataSourceQo) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
QcInspectionItemDict byInspectionItemCode = inspectionItemDictDao.findByInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||
QcInspectionItemDictEntity byInspectionItemCode = inspectionItemDictDao.findByInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||
if (byInspectionItemCode == null) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该字典类型!", locale);
|
||||
}
|
||||
QcInspectionDataSource qcInspectionDataSource = new QcInspectionDataSource();
|
||||
QcInspectionDataSourceEntity qcInspectionDataSourceEntity = new QcInspectionDataSourceEntity();
|
||||
if (inspectionDataSourceQo.getId() > 0) {
|
||||
qcInspectionDataSource.setId(inspectionDataSourceQo.getId());
|
||||
qcInspectionDataSourceEntity.setId(inspectionDataSourceQo.getId());
|
||||
}
|
||||
qcInspectionDataSource.setLotNo(inspectionDataSourceQo.getLotNo());
|
||||
qcInspectionDataSource.setMachineNo(inspectionDataSourceQo.getMachineNo());
|
||||
qcInspectionDataSource.setMaterialNo(inspectionDataSourceQo.getMaterialNo());
|
||||
qcInspectionDataSource.setModelNo(inspectionDataSourceQo.getModelNo());
|
||||
qcInspectionDataSource.setPartNo(inspectionDataSourceQo.getPartNo());
|
||||
qcInspectionDataSource.setInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||
qcInspectionDataSource.setInspectValue(inspectionDataSourceQo.getInspectValue());
|
||||
inspectionDataSourceDao.save(qcInspectionDataSource);
|
||||
qcInspectionDataSourceEntity.setLotNo(inspectionDataSourceQo.getLotNo());
|
||||
qcInspectionDataSourceEntity.setMachineNo(inspectionDataSourceQo.getMachineNo());
|
||||
qcInspectionDataSourceEntity.setMaterialNo(inspectionDataSourceQo.getMaterialNo());
|
||||
qcInspectionDataSourceEntity.setModelNo(inspectionDataSourceQo.getModelNo());
|
||||
qcInspectionDataSourceEntity.setPartNo(inspectionDataSourceQo.getPartNo());
|
||||
qcInspectionDataSourceEntity.setInspectionItemCode(inspectionDataSourceQo.getInspectionItemCode());
|
||||
qcInspectionDataSourceEntity.setInspectValue(inspectionDataSourceQo.getInspectValue());
|
||||
inspectionDataSourceDao.save(qcInspectionDataSourceEntity);
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||
}
|
||||
}
|
||||
|
@ -3,9 +3,9 @@ package com.xkrs.service.impl;
|
||||
import com.xkrs.dao.QcInspectionDataSourceDao;
|
||||
import com.xkrs.dao.QcInspectionFileDao;
|
||||
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.model.entity.QcInspectionDataSource;
|
||||
import com.xkrs.model.entity.QcInspectionFile;
|
||||
import com.xkrs.model.entity.QcInspectionItemDict;
|
||||
import com.xkrs.model.entity.QcInspectionDataSourceEntity;
|
||||
import com.xkrs.model.entity.QcInspectionFileEntity;
|
||||
import com.xkrs.model.entity.QcInspectionItemDictEntity;
|
||||
import com.xkrs.model.qo.QcInspectionFileQo;
|
||||
import com.xkrs.service.QcInspectionFileService;
|
||||
import com.xkrs.util.ExcelUploadUtil;
|
||||
@ -36,7 +36,7 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
||||
private QcInspectionFileDao inspectionFileDao;
|
||||
|
||||
@Resource
|
||||
private QcInspectionItemDict inspectionItemDict;
|
||||
private QcInspectionItemDictEntity inspectionItemDict;
|
||||
|
||||
@Resource
|
||||
private QcInspectionDataSourceDao inspectionDataSourceDao;
|
||||
@ -55,15 +55,15 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
||||
String modelNo = inspectionFileQo.getModelNo();
|
||||
String partNo = inspectionFileQo.getPartNo();
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<QcInspectionFile> qcInspectionFiles = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
if (qcInspectionFiles != null || qcInspectionFiles.isEmpty()) {
|
||||
List<QcInspectionFileEntity> qcInspectionFileEntities = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
if (qcInspectionFileEntities != null || qcInspectionFileEntities.isEmpty()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "已存在该产品的模板!", locale);
|
||||
}
|
||||
if (fileExcel == null) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "模板不能为空!", locale);
|
||||
}
|
||||
String file = ExcelUploadUtil.memoryFile(fileExcel);
|
||||
QcInspectionFile fileEntity = new QcInspectionFile();
|
||||
QcInspectionFileEntity fileEntity = new QcInspectionFileEntity();
|
||||
fileEntity.setId(inspectionFileQo.getId());
|
||||
fileEntity.setLotNo(lotNo);
|
||||
fileEntity.setMachineNo(machineNo);
|
||||
@ -90,17 +90,17 @@ public class QcInspectionFileServiceImpl implements QcInspectionFileService {
|
||||
String modelNo = inspectionFileQo.getModelNo();
|
||||
String partNo = inspectionFileQo.getPartNo();
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
List<QcInspectionFile> qcInspectionFiles = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
if (qcInspectionFiles == null || qcInspectionFiles.isEmpty()) {
|
||||
List<QcInspectionFileEntity> qcInspectionFileEntities = inspectionFileDao.selectFile(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
if (qcInspectionFileEntities == null || qcInspectionFileEntities.isEmpty()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的模板,请添加!", locale);
|
||||
}
|
||||
String templatePath = qcInspectionFiles.get(0).getTemplatePath();
|
||||
List<QcInspectionDataSource> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
String templatePath = qcInspectionFileEntities.get(0).getTemplatePath();
|
||||
List<QcInspectionDataSourceEntity> inspectionDataSources = inspectionDataSourceDao.selectDataSource(lotNo, machineNo, materialNo, modelNo, partNo);
|
||||
if (inspectionDataSources == null || inspectionDataSources.isEmpty()) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的信息!", locale);
|
||||
}
|
||||
Map<String, String> map = new HashMap<>();
|
||||
for (QcInspectionDataSource inspectionDataSource : inspectionDataSources) {
|
||||
for (QcInspectionDataSourceEntity inspectionDataSource : inspectionDataSources) {
|
||||
map.put(inspectionDataSource.getInspectionItemCode(), inspectionDataSource.getInspectValue());
|
||||
}
|
||||
String fill = ExportExcel.exportToProveExcel(map, templatePath);
|
||||
|
@ -2,7 +2,7 @@ package com.xkrs.service.impl;
|
||||
|
||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||
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.service.QcInspectionItemDictService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
@ -32,14 +32,14 @@ public class QcInspectionItemDictServiceImpl implements QcInspectionItemDictServ
|
||||
@Override
|
||||
public String insertDataDict(QcInspectionItemDictQo inspectionItemDictQo) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
QcInspectionItemDict englishName = inspectionItemDictDao.findByInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||
QcInspectionItemDictEntity englishName = inspectionItemDictDao.findByInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||
if (englishName != null) {
|
||||
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该产品变量已存在,请勿重复添加!", locale);
|
||||
}
|
||||
QcInspectionItemDict qcInspectionItemDict = new QcInspectionItemDict();
|
||||
qcInspectionItemDict.setInspectionItemName(inspectionItemDictQo.getInspectionItemName());
|
||||
qcInspectionItemDict.setInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||
inspectionItemDictDao.save(qcInspectionItemDict);
|
||||
QcInspectionItemDictEntity qcInspectionItemDictEntity = new QcInspectionItemDictEntity();
|
||||
qcInspectionItemDictEntity.setInspectionItemName(inspectionItemDictQo.getInspectionItemName());
|
||||
qcInspectionItemDictEntity.setInspectionItemCode(inspectionItemDictQo.getInspectionItemCode());
|
||||
inspectionItemDictDao.save(qcInspectionItemDictEntity);
|
||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.xkrs.service.impl;
|
||||
|
||||
import com.xkrs.dao.QcInspectionPictureDao;
|
||||
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.service.QcInspectionPictureService;
|
||||
import com.xkrs.util.ExcelUploadUtil;
|
||||
@ -26,7 +26,7 @@ public class QcInspectionPictureServiceImpl implements QcInspectionPictureServic
|
||||
public String insertPicture(QcInspectionPictureQo inspectionPictureQo, MultipartFile pictureFile) throws IOException {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
String file = ExcelUploadUtil.memoryFile(pictureFile);
|
||||
QcInspectionPicture qcInspectionPicture = new QcInspectionPicture();
|
||||
QcInspectionPictureEntity qcInspectionPicture = new QcInspectionPictureEntity();
|
||||
qcInspectionPicture.setId(inspectionPictureQo.getId());
|
||||
qcInspectionPicture.setLotNo(inspectionPictureQo.getLotNo());
|
||||
qcInspectionPicture.setMachineNo(inspectionPictureQo.getMachineNo());
|
||||
|
@ -3,7 +3,7 @@ package com.xkrs.service.impl;
|
||||
import com.xkrs.dao.QcInspectionItemDictDao;
|
||||
import com.xkrs.dao.QcInspectionSpecDao;
|
||||
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.service.QcInspectionSpecService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
@ -33,7 +33,7 @@ public class QcInspectionSpecServiceImpl implements QcInspectionSpecService {
|
||||
@Override
|
||||
public String insertSpec(QcInspectionSpecQo inspectionSpecQo) {
|
||||
Locale locale = LocaleContextHolder.getLocale();
|
||||
QcInspectionSpec inspectionSpec = new QcInspectionSpec();
|
||||
QcInspectionSpecEntity inspectionSpec = new QcInspectionSpecEntity();
|
||||
if (inspectionSpecQo.getId() > 0) {
|
||||
inspectionSpec.setId(inspectionSpecQo.getId());
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.xkrs.util;
|
||||
|
||||
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.stereotype.Component;
|
||||
|
||||
@ -28,10 +28,10 @@ public class Query {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<QcInspectionItemDict> selectDataDict(String inspectionItemCode, String inspectionItemName) {
|
||||
Specification<QcInspectionItemDict> specification = new Specification<QcInspectionItemDict>() {
|
||||
public List<QcInspectionItemDictEntity> selectDataDict(String inspectionItemCode, String inspectionItemName) {
|
||||
Specification<QcInspectionItemDictEntity> specification = new Specification<QcInspectionItemDictEntity>() {
|
||||
@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<>();
|
||||
if (inspectionItemCode != null && !"".equals(inspectionItemCode)) {
|
||||
list.add(criteriaBuilder.equal(root.get("inspectionItemCode").as(String.class), inspectionItemCode));
|
||||
|
Loading…
Reference in New Issue
Block a user