1.产品信息添加修改时间字段

master
x_z 3 years ago
parent b01e7f995b
commit 58e4cda5bd

@ -117,7 +117,9 @@ public class UdiContrastController {
}
udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
// udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setUpdateTime(DateUtil.formatDateTime(new Date()));
String time = DateUtil.formatDateTime(new Date());
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
return ResultVOUtils.success("切换成功!");
}
@ -130,7 +132,9 @@ public class UdiContrastController {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(combineRequest.getRelId());
udiRelevanceEntity = setThird(combineRequest, udiRelevanceEntity);
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setManufactory(combineRequest.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
@ -239,7 +243,9 @@ public class UdiContrastController {
udiRelevanceEntity.setMainId(combineRequest.getThirdId());
udiRelevanceEntity.setMainName(combineRequest.getErpName());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
if (combineRequest.getManufactory() != null) {
udiRelevanceEntity.setManufactory(combineRequest.getManufactory());
@ -255,7 +261,9 @@ public class UdiContrastController {
public void createOnlyUuid(CombineRequest combineRequest, String key) {
List<UdiInfoEntity> udiInfoEntities = udiDlHttpClient.getOrUpdateByUuid(key);
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setPrice(combineRequest.getPrice());
udiRelevanceEntity.setManufactory(udiInfoEntities.get(0).getYlqxzcrbarmc());
@ -276,7 +284,9 @@ public class UdiContrastController {
udiRelevanceEntity.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity.setMainId(thrProductsEntity.getCode());
udiRelevanceEntity.setMainName(thrProductsEntity.getName());
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setUuid(CustomUtil.getUUId());
udiRelevanceEntity.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity.setSupName(combineRequest.getSupName());
@ -306,7 +316,9 @@ public class UdiContrastController {
List<UdiInfoEntity> udiInfoEntities = udiDlHttpClient.getOrUpdateByUuid(key);
udiInfoService.deleteByUuid(udiRelevanceEntity.getUuid());
udiRelevanceEntity.setUuid(udiInfoEntities.get(0).getUuid());
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
insertUdiInfos(udiInfoEntities);
}

@ -9,12 +9,10 @@ import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.config.WebSocketServer;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.*;
import com.glxp.api.admin.entity.info.CompanyEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.inout.WarehouseEntity;
import com.glxp.api.admin.entity.inventory.InvProductEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.UdiDlHttpClient;
import com.glxp.api.admin.req.basic.*;
import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.req.inout.WarehouseQueryRequest;
@ -40,7 +38,6 @@ import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -49,7 +46,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -290,7 +286,9 @@ public class UdiRelevanceController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
return ResultVOUtils.success("更新成功");
}
@ -462,8 +460,9 @@ public class UdiRelevanceController {
} else {
udiRelevanceEntity.setUuid(postSmpUdiInfoRequest.getUuid());
}
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
udiInfoEntity.setYbbm(postSmpUdiInfoRequest.getYbbm());
udiInfoEntity.setSptm(postSmpUdiInfoRequest.getSptm());
@ -661,7 +660,9 @@ public class UdiRelevanceController {
udiInfoEntity.setDiType(1);
udiInfoService.insertUdiInfo(udiInfoEntity);
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
return ResultVOUtils.success("解除绑定成功!");
}

@ -62,7 +62,9 @@ public class InoutUtils {
udiInfoEntity = udiInfoService.findByNameCode(prefix);
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setThirdId(udiInfoEntity.getThirdId());
udiRelevanceEntity.setThirdName(udiInfoEntity.getThirdName());
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");

@ -33,6 +33,7 @@ public class UdiRelevanceEntity {
private String supName;
private String originUuid;
private String price;
private String modifyTime;//修改时间
public Integer getLockStatus() {
if (lockStatus == null)

@ -1,22 +1,16 @@
package com.glxp.api.admin.thread;
import com.glxp.api.admin.constant.BasicProcessStatus;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.BasicExportStatusEntity;
import com.glxp.api.admin.entity.basic.BasicThirdSysEntity;
import com.glxp.api.admin.entity.basic.UdiInfoEntity;
import com.glxp.api.admin.entity.basic.UdiRelevanceEntity;
import com.glxp.api.admin.entity.info.SystemParamConfigEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.ErpBasicClient;
import com.glxp.api.admin.httpclient.ErpInvClient;
import com.glxp.api.admin.req.basic.FilterErpGoodsRequest;
import com.glxp.api.admin.req.inventory.ErpOnhandRequest;
import com.glxp.api.admin.req.thrsys.FilterThrProductsRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.basic.ErpProductsResponse;
import com.glxp.api.admin.res.inventory.ErpInvProductResponse;
import com.glxp.api.admin.service.basic.BasicExportService;
import com.glxp.api.admin.service.basic.BasicThirdSysService;
import com.glxp.api.admin.service.basic.UdiInfoService;
import com.glxp.api.admin.service.basic.UdiRelevanceService;
@ -32,8 +26,10 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class BasicBackUpdateProductService {
@ -141,7 +137,9 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setManufactory(invmandocResponse.getManufactory());
udiRelevanceEntity1.setThirdId(invmandocResponse.getCode());
udiRelevanceEntity1.setThirdName(invmandocResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
@ -270,7 +268,9 @@ public class BasicBackUpdateProductService {
udiRelevanceEntity1.setManufactory(thrProductsEntity.getManufactory());
udiRelevanceEntity1.setThirdId(thrProductsEntity.getCode());
udiRelevanceEntity1.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity1.setModifyTime(time);
udiRelevanceService.insertUdiRelevanceignore(udiRelevanceEntity1);
}
}

@ -156,7 +156,9 @@ public class BasicUdiInfoImportService {
temp = new UdiRelevanceEntity();
temp.setUuid(udiInfoEntity.getUuid());
udiInfoImportDetailEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_CODE_SUCESS);
temp.setUpdateTime(DateUtil.formatDateTime(new Date()));
String time = DateUtil.formatDateTime(new Date());
temp.setUpdateTime(time);
temp.setModifyTime(time);
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(temp);
} else {
@ -221,7 +223,9 @@ public class BasicUdiInfoImportService {
public void updateValue(UdiRelevanceEntity udiRelevanceEntity, UdiInfoImportDetailEntity udiInfoImportDetailEntity,
UdiInfoImportLogEntity udiInfoImportLogEntity, String mainId) {
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
if (udiInfoImportDetailEntity.getYbbm() != null && !udiInfoImportDetailEntity.getYbbm().trim().equals("")) {
udiRelevanceEntity.setYbbm(udiInfoImportDetailEntity.getYbbm());
}

@ -6,10 +6,8 @@ import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.basic.*;
import com.glxp.api.admin.entity.thrsys.ThrInvProductsEntity;
import com.glxp.api.admin.entity.thrsys.ThrProductsEntity;
import com.glxp.api.admin.httpclient.ErpBasicClient;
import com.glxp.api.admin.httpclient.ErpInvClient;
import com.glxp.api.admin.req.basic.CombineRequest;
import com.glxp.api.admin.req.basic.FilterErpGoodsRequest;
import com.glxp.api.admin.req.basic.FilterUdiInfoRequest;
import com.glxp.api.admin.req.inventory.ErpOnhandRequest;
import com.glxp.api.admin.req.thrsys.FilterThrInvProductsRequest;
@ -125,7 +123,9 @@ public class BasicUpdateProductService {
udiInfoService.insertUdiInfo(udiInfoEntity);
udiRelevanceEntity1.setUuid(udiInfoEntity.getUuid());
udiRelevanceEntity1.setThirdName(thrProductsEntity.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity1.setModifyTime(time);
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
String mainSys = basicThirdSysEntity.getThirdId();
if (mainSys.equals("thirdId")) {
@ -208,7 +208,9 @@ public class BasicUpdateProductService {
udiRelevanceEntity1.setThirdId(onhandQueryResponse.getCode());
udiRelevanceEntity1.setThirdName(onhandQueryResponse.getName());
udiRelevanceEntity1.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity1.setUpdateTime(time);
udiRelevanceEntity1.setModifyTime(time);
udiRelevanceEntity1.setId(gennerOrderUtils.getRelId() + "");
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity1);
}
@ -227,7 +229,9 @@ public class BasicUpdateProductService {
udiInfoService.insertUdiInfos(UdiInfoUtil.initUdiInfoEntitys(udiInfoEntities));
for (UdiInfoEntity udiInfoEntity : udiInfoEntities) {
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setUpdateTime(DateUtil.getDateTime());
String time = DateUtil.getDateTime();
udiRelevanceEntity.setUpdateTime(time);
udiRelevanceEntity.setModifyTime(time);
udiRelevanceEntity.setUuid(udiInfoEntity.getUuid());
List<UdiRelevanceEntity> udiRelevanceEntities = udiRelevanceService.selectByUuid(udiInfoEntity.getUuid());
if (udiRelevanceEntities != null && udiRelevanceEntities.size() > 0) {

@ -37,6 +37,7 @@ import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.service.thrsys.ThrInvWarehouseService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.DateUtil;
import com.glxp.api.admin.util.RedisUtil;
import com.glxp.api.common.res.BaseResponse;
import org.apache.ibatis.session.ExecutorType;
@ -137,6 +138,7 @@ public class DlBasicService {
UdiRelevanceDao mapper = batchSession.getMapper(UdiRelevanceDao.class);
for (UdiRelevanceEntity basicUnitMaintainEntity : corpList) {
basicUnitMaintainEntity.setUpdateTime(null);
basicUnitMaintainEntity.setModifyTime(DateUtil.getDateTime());
mapper.insertUdiRelevance(basicUnitMaintainEntity);
}
batchSession.commit();

@ -86,7 +86,7 @@
AND nameCode = #{uniqueNameCode}
</if>
</where>
ORDER BY updateTime DESC
ORDER BY modifyTime DESC
</select>
@ -293,7 +293,7 @@
</if>
</where>
ORDER BY updateTime DESC
ORDER BY modifyTime DESC
</select>
@ -389,6 +389,7 @@
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
</where>
order by modifyTime desc
</select>
@ -396,7 +397,7 @@
replace
INTO basic_udirel
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId,thirdName,uuid,isUseDy,updateTime,modifyTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,price
)
@ -408,6 +409,7 @@
#{uuid},
#{isUseDy},
#{updateTime},
#{modifyTime},
#{thirdId1},
#{thirdId2},
#{thirdId3},
@ -437,7 +439,7 @@
ignore
INTO basic_udirel
(id,
thirdId,thirdName,uuid,isUseDy,updateTime,
thirdId,thirdName,uuid,isUseDy,updateTime,modifyTime,
thirdId1,thirdId2,thirdId3,thirdId4,thirdName1,thirdName2,thirdName3,thirdName4,manufactory,measname,ybbm,sptm,isDisable,isLock
,mainId,mainName,lockStatus,udplatCode,isAdavence,supName,price
)
@ -449,6 +451,7 @@
#{uuid},
#{isUseDy},
#{updateTime},
#{modifyTime},
#{thirdId1},
#{thirdId2},
#{thirdId3},
@ -510,6 +513,7 @@
<if test="ybbm != null">ybbm=#{ybbm},</if>
<if test="sptm != null">sptm=#{sptm},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="modifyTime != null">modifyTime=#{modifyTime},</if>
<if test="isDisable != null">isDisable=#{isDisable},</if>
<if test="isLock != null">isLock=#{isLock},</if>
<if test="mainId != null">mainId=#{mainId},</if>
@ -540,7 +544,7 @@
</select>
<insert id="importUdiRelevance" parameterType="java.util.List">
replace into basic_udirel (id, thirdId, thirdName, uuid, isUseDy, updateTime, thirdId1, thirdId2, thirdId3,
replace into basic_udirel (id, thirdId, thirdName, uuid, isUseDy, updateTime, modifyTime, thirdId1, thirdId2, thirdId3,
thirdId4, thirdName1, thirdName2, thirdName3, thirdName4, ybbm, sptm, manufactory,
measname, isDisable, mainId, mainName, udplatCode,supName,price)
values
@ -551,6 +555,7 @@
#{item.uuid},
#{item.isUseDy},
#{item.updateTime},
#{item.modifyTime},
#{item.thirdId1},
#{item.thirdId2},
#{item.thirdId3},

Loading…
Cancel
Save