diff --git a/modules/i3plus-pojo-andon/pom.xml b/modules/i3plus-pojo-andon/pom.xml index bc7071b..004fb69 100644 --- a/modules/i3plus-pojo-andon/pom.xml +++ b/modules/i3plus-pojo-andon/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-aps/pom.xml b/modules/i3plus-pojo-aps/pom.xml index f902a7c..650ee5b 100644 --- a/modules/i3plus-pojo-aps/pom.xml +++ b/modules/i3plus-pojo-aps/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-base-mongo/pom.xml b/modules/i3plus-pojo-base-mongo/pom.xml index 5868e20..15ad445 100644 --- a/modules/i3plus-pojo-base-mongo/pom.xml +++ b/modules/i3plus-pojo-base-mongo/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-base/pom.xml b/modules/i3plus-pojo-base/pom.xml index d2521de..1e17935 100644 --- a/modules/i3plus-pojo-base/pom.xml +++ b/modules/i3plus-pojo-base/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-form/pom.xml b/modules/i3plus-pojo-form/pom.xml index b599490..37b8a51 100644 --- a/modules/i3plus-pojo-form/pom.xml +++ b/modules/i3plus-pojo-form/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-hardswitch/pom.xml b/modules/i3plus-pojo-hardswitch/pom.xml index aca1465..0a44fb0 100644 --- a/modules/i3plus-pojo-hardswitch/pom.xml +++ b/modules/i3plus-pojo-hardswitch/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-ics/pom.xml b/modules/i3plus-pojo-ics/pom.xml index ae38208..6df1cc2 100644 --- a/modules/i3plus-pojo-ics/pom.xml +++ b/modules/i3plus-pojo-ics/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-jobflow/pom.xml b/modules/i3plus-pojo-jobflow/pom.xml index 1674a47..123fdc9 100644 --- a/modules/i3plus-pojo-jobflow/pom.xml +++ b/modules/i3plus-pojo-jobflow/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-lac/pom.xml b/modules/i3plus-pojo-lac/pom.xml index 04b40d4..fdcf6e3 100644 --- a/modules/i3plus-pojo-lac/pom.xml +++ b/modules/i3plus-pojo-lac/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-mdm/pom.xml b/modules/i3plus-pojo-mdm/pom.xml index 6854e65..d266163 100644 --- a/modules/i3plus-pojo-mdm/pom.xml +++ b/modules/i3plus-pojo-mdm/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-mes-pcn/pom.xml b/modules/i3plus-pojo-mes-pcn/pom.xml index ac387fd..60d9861 100644 --- a/modules/i3plus-pojo-mes-pcn/pom.xml +++ b/modules/i3plus-pojo-mes-pcn/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-mes/pom.xml b/modules/i3plus-pojo-mes/pom.xml index bbe0ff9..54c8306 100644 --- a/modules/i3plus-pojo-mes/pom.xml +++ b/modules/i3plus-pojo-mes/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-model/pom.xml b/modules/i3plus-pojo-model/pom.xml index be533a6..190efa7 100644 --- a/modules/i3plus-pojo-model/pom.xml +++ b/modules/i3plus-pojo-model/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserExportModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserExportModel.java index c3d4274..c665e3b 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserExportModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/platform/UserExportModel.java @@ -135,38 +135,46 @@ public class UserExportModel extends BaseBean { } public UserExportModel setSysUser(SysUser sysUser){ - this.userLoginName=sysUser.getUserLoginName(); - this.userPhone=sysUser.getUserPhone(); - this.userEmail=sysUser.getUserEmail(); - this.infoEmpNo=sysUser.getUserEmpNo(); + if (sysUser != null) { + this.userLoginName = sysUser.getUserLoginName(); + this.userPhone = sysUser.getUserPhone(); + this.userEmail = sysUser.getUserEmail(); + this.infoEmpNo = sysUser.getUserEmpNo(); + } else { + this.userLoginName = "用户账号不存在"; + } return this; } public UserExportModel setSysUserInfo(SysUserInfo sysUserInfo){ - this.infoName=sysUserInfo.getName(); - this.departmentNameRdd=sysUserInfo.getDepartmentNameRdd(); - this.positionNameRdd=sysUserInfo.getPositionNameRdd(); - this.organizeNameRdd=sysUserInfo.getOrganizeNameRdd(); - this.infoEmployeeType=sysUserInfo.getUserEmployeeType(); - this.infoGrade=sysUserInfo.getUserGrade(); - this.infoSex=sysUserInfo.getUserSex(); - this.infoMarriage=sysUserInfo.getUserMarriage(); - this.infoCardType=sysUserInfo.getUserCardType(); - this.infoCardNumber=sysUserInfo.getUserCardNumber(); - this.infoSchoolProfession=sysUserInfo.getUserSchoolProfession(); - this.infoSchool=sysUserInfo.getUserSchool(); - this.infoSchoolEducation=sysUserInfo.getUserSchoolEducation(); - this.infoSchoolLeaveDate=sysUserInfo.getUserSchoolLeaveDate(); - this.infoBirthplace=sysUserInfo.getUserBirthplace(); - this.infoRace=sysUserInfo.getUserRace(); - this.infoEmergencyContact=sysUserInfo.getUserEmergencyContact(); - this.infoEmergencyPhone=sysUserInfo.getUserEmergencyPhone(); - this.infoJoinDate=sysUserInfo.getUserJoinDate(); - this.infoResignationDate=sysUserInfo.getUserResignationDate(); - this.infoBornDate=sysUserInfo.getUserBornDate(); - this.infoPoliticalStatus=sysUserInfo.getUserPoliticalStatus(); - this.infoHobby=sysUserInfo.getUserHobby(); - this.infoFamilyAddress=sysUserInfo.getUserFamilyAddress(); + if (sysUserInfo != null) { + this.infoName = sysUserInfo.getName(); + this.departmentNameRdd = sysUserInfo.getDepartmentNameRdd(); + this.positionNameRdd = sysUserInfo.getPositionNameRdd(); + this.organizeNameRdd = sysUserInfo.getOrganizeNameRdd(); + this.infoEmployeeType = sysUserInfo.getUserEmployeeType(); + this.infoGrade = sysUserInfo.getUserGrade(); + this.infoSex = sysUserInfo.getUserSex(); + this.infoMarriage = sysUserInfo.getUserMarriage(); + this.infoCardType = sysUserInfo.getUserCardType(); + this.infoCardNumber = sysUserInfo.getUserCardNumber(); + this.infoSchoolProfession = sysUserInfo.getUserSchoolProfession(); + this.infoSchool = sysUserInfo.getUserSchool(); + this.infoSchoolEducation = sysUserInfo.getUserSchoolEducation(); + this.infoSchoolLeaveDate = sysUserInfo.getUserSchoolLeaveDate(); + this.infoBirthplace = sysUserInfo.getUserBirthplace(); + this.infoRace = sysUserInfo.getUserRace(); + this.infoEmergencyContact = sysUserInfo.getUserEmergencyContact(); + this.infoEmergencyPhone = sysUserInfo.getUserEmergencyPhone(); + this.infoJoinDate = sysUserInfo.getUserJoinDate(); + this.infoResignationDate = sysUserInfo.getUserResignationDate(); + this.infoBornDate = sysUserInfo.getUserBornDate(); + this.infoPoliticalStatus = sysUserInfo.getUserPoliticalStatus(); + this.infoHobby = sysUserInfo.getUserHobby(); + this.infoFamilyAddress = sysUserInfo.getUserFamilyAddress(); + } else { + this.infoName = "用户消息不存在"; + } return this; } } diff --git a/modules/i3plus-pojo-platform/pom.xml b/modules/i3plus-pojo-platform/pom.xml index 14e8567..5896851 100644 --- a/modules/i3plus-pojo-platform/pom.xml +++ b/modules/i3plus-pojo-platform/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysSoftUpdateRecord.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysSoftUpdateRecord.java new file mode 100644 index 0000000..f5985dc --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/bean/SysSoftUpdateRecord.java @@ -0,0 +1,78 @@ +package cn.estsh.i3plus.pojo.platform.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Description : + * @Reference : + * @Author : yunhao + * @CreateDate : 2020-09-13 17:35 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="SYS_SOFT_UPDATE_RECORD") +@ApiModel(value="软件更新记录",description = "软件更新记录") +public class SysSoftUpdateRecord extends BaseBean { + + @Column(name="SYSTEM_SOFT_TYPE") + @ApiParam(value ="系统软件类型") + private Integer systemSoftType; + + public String getSystemSoftTypeTxt(){ + return systemSoftType == null ? "无" : CommonEnumUtil.SOFT_TYPE.valueOfDescription(systemSoftType); + } + + @Column(name="SYSTEM_VERSION") + @ApiParam(value ="系统版本") + private String systemVersion; + + @Lob + @Column(name="UPDATE_CONTENT") + @ApiParam(value ="更新内容") + private String updateContent; + + @Column(name="FIRST_DEPLOYMENT_TIME") + @ApiParam(value ="首次部署时间") + private String firstDeploymentTime; + + @Transient + private Map> updateDetailMap; + + public void putUpdateDetail(String detailType, String detail) { + if(updateDetailMap == null){ + updateDetailMap = new HashMap<>(); + } + + List detailList; + if (updateDetailMap.containsKey(detailType)) { + detailList = updateDetailMap.get(detailType); + } else { + detailList = new ArrayList<>(); + updateDetailMap.put(detailType, detailList); + } + + detailList.add(detail); + } + + public void transformUpdateDetail() { + this.updateContent = JSON.toJSONString(updateDetailMap); + } +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysSoftUpdateRecordRepository.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysSoftUpdateRecordRepository.java new file mode 100644 index 0000000..9b9953c --- /dev/null +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysSoftUpdateRecordRepository.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.pojo.platform.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.platform.bean.SysSoftUpdateRecord; + +/** + * @Description : + * @Reference : + * @Author : yunhao + * @CreateDate : 2020-09-14 13:15 + * @Modify: + **/ +public interface SysSoftUpdateRecordRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysToolTypeRepository.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysToolTypeRepository.java index f74a350..614b9a7 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysToolTypeRepository.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/repository/SysToolTypeRepository.java @@ -2,6 +2,10 @@ package cn.estsh.i3plus.pojo.platform.repository; import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; import cn.estsh.i3plus.pojo.platform.bean.SysToolType; +import org.springframework.data.jpa.repository.Lock; +import org.springframework.data.jpa.repository.Query; + +import javax.persistence.LockModeType; /** * @Description : 设备类型 @@ -11,4 +15,9 @@ import cn.estsh.i3plus.pojo.platform.bean.SysToolType; * @Modify : **/ public interface SysToolTypeRepository extends BaseRepository { + + @Lock(LockModeType.PESSIMISTIC_WRITE) + @Query(value = "from SysToolType where id = ?1") + SysToolType getByIds(Long id); + } diff --git a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java index e0c1886..ff6f6bc 100644 --- a/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java +++ b/modules/i3plus-pojo-platform/src/main/java/cn/estsh/i3plus/pojo/platform/sqlpack/CoreHqlPack.java @@ -1210,4 +1210,26 @@ public class CoreHqlPack { return ddlPackBean; } + + public static DdlPackBean packHqlQuerySysSoftUpdateRecord(SysSoftUpdateRecord sysSoftUpdateRecord){ + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(sysSoftUpdateRecord); + + DdlPreparedPack.getNumEqualPack(sysSoftUpdateRecord.getSystemSoftType(), "systemSoftType", ddlPackBean); + DdlPreparedPack.getStringEqualPack(sysSoftUpdateRecord.getSystemVersion(), "systemVersion", ddlPackBean); + DdlPreparedPack.timeBuilder(sysSoftUpdateRecord.getFirstDeploymentTime(), "firstDeploymentTime", ddlPackBean, false, + true); + + return ddlPackBean; + } + + public static DdlPackBean packHqlCheckSysSoftUpdateRecordOnly(SysSoftUpdateRecord sysSoftUpdateRecord){ + DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(sysSoftUpdateRecord); + + DdlPreparedPack.getNumNOEqualPack(sysSoftUpdateRecord.getId(), "id", ddlPackBean); + DdlPreparedPack.getNumEqualPack(sysSoftUpdateRecord.getSystemSoftType(), "systemSoftType", ddlPackBean); + DdlPreparedPack.getStringEqualPack(sysSoftUpdateRecord.getSystemVersion(), "systemVersion", ddlPackBean); + + return ddlPackBean; + } + } \ No newline at end of file diff --git a/modules/i3plus-pojo-ptl/pom.xml b/modules/i3plus-pojo-ptl/pom.xml index 102ab0e..aa3dd42 100644 --- a/modules/i3plus-pojo-ptl/pom.xml +++ b/modules/i3plus-pojo-ptl/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-report/pom.xml b/modules/i3plus-pojo-report/pom.xml index 864c56a..80498fc 100644 --- a/modules/i3plus-pojo-report/pom.xml +++ b/modules/i3plus-pojo-report/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-softswitch/pom.xml b/modules/i3plus-pojo-softswitch/pom.xml index e755225..076f15a 100644 --- a/modules/i3plus-pojo-softswitch/pom.xml +++ b/modules/i3plus-pojo-softswitch/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-sweb/pom.xml b/modules/i3plus-pojo-sweb/pom.xml index 194f0cb..1351ed3 100644 --- a/modules/i3plus-pojo-sweb/pom.xml +++ b/modules/i3plus-pojo-sweb/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-wms/pom.xml b/modules/i3plus-pojo-wms/pom.xml index 60543fe..67b0bff 100644 --- a/modules/i3plus-pojo-wms/pom.xml +++ b/modules/i3plus-pojo-wms/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsAutoPurchasePartModel.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsAutoPurchasePartModel.java index a5a55d2..e651958 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsAutoPurchasePartModel.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/modelbean/WmsAutoPurchasePartModel.java @@ -39,11 +39,18 @@ public class WmsAutoPurchasePartModel extends Pager { @ApiParam("供应商名称") private String vendorName; - public WmsAutoPurchasePartModel(String partNo, String partName, Integer qty, String warehouse) { + @ApiParam("要货时间") + private String arriveTime; + + private Integer preReceivingDay; + + + public WmsAutoPurchasePartModel(String partNo, String partName, Integer qty, String warehouse, Integer preReceivingDay) { this.partNo = partNo; this.partName = partName; this.qty = qty; this.erpWarehouse = warehouse; + this.preReceivingDay = preReceivingDay; } public WmsAutoPurchasePartModel() { diff --git a/modules/i3plus-pojo-workflow/pom.xml b/modules/i3plus-pojo-workflow/pom.xml index bdc4cab..15d36cd 100644 --- a/modules/i3plus-pojo-workflow/pom.xml +++ b/modules/i3plus-pojo-workflow/pom.xml @@ -5,7 +5,7 @@ i3plus-pojo i3plus.pojo - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT ../../pom.xml 4.0.0 diff --git a/pom.xml b/pom.xml index cc6131f..f06d17f 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ i3plus.pojo i3plus-pojo pom - 1.0-TEST-SNAPSHOT + 1.0-DEV-SNAPSHOT modules/i3plus-pojo-base modules/i3plus-pojo-platform diff --git a/sonar-project.properties b/sonar-project.properties index 0786d8d..268eaf2 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.projectKey=i3plus.pojo:i3plus-pojo # defaults to project key sonar.projectName=i3plus-pojo # defaults to 'not provided' -sonar.projectVersion=1.0-TEST-SNAPSHOT +sonar.projectVersion=1.0-DEV-SNAPSHOT # Path is relative to the sonar-project.properties file. Defaults to . #sonar.sources=./