Browse Source

1.增加运单收货人修改日志

pull/5/head
zhenghaoyu 10 months ago
parent
commit
ba7b64502c
  1. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

31
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java

@ -41,6 +41,7 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringUtil;
@ -353,7 +354,20 @@ public class DistributionStockArticleController extends BladeController {
public R updateClient(@Valid @RequestBody DistributionStockArticleEntity distributionStockArticle) {
Long id = distributionStockArticle.getId();
DistributionStockArticleEntity oldStockArticle = distributionStockArticleService.getById(id);
String content = oldStockArticle.compareCustomerInfo(distributionStockArticle);
DistributionStockArticleEntity newStockArticle = new DistributionStockArticleEntity();
BeanUtil.copy(oldStockArticle,newStockArticle);
String consigneePerson = distributionStockArticle.getConsigneePerson();
String customerName = distributionStockArticle.getCustomerName();
if(StringUtil.isNotBlank(consigneePerson)){
newStockArticle.setConsigneePerson(consigneePerson);
newStockArticle.setConsigneeMobile(distributionStockArticle.getConsigneeMobile());
newStockArticle.setConsigneeAddress(distributionStockArticle.getConsigneeAddress());
}else{
newStockArticle.setCustomerName(customerName);
newStockArticle.setCustomerTelephone(distributionStockArticle.getCustomerTelephone());
newStockArticle.setCustomerAddress(distributionStockArticle.getCustomerAddress());
}
String content = oldStockArticle.compareCustomerInfo(newStockArticle);
if(StringUtil.isNotBlank(content)){
distributionOrderCustomerLogService.saveLog(content,1,id);
}
@ -368,7 +382,20 @@ public class DistributionStockArticleController extends BladeController {
for (DistributionStockArticleEntity stockArticleEntity : entityList) {
Long id = stockArticleEntity.getId();
DistributionStockArticleEntity oldStockArticle = distributionStockArticleService.getById(id);
String content = oldStockArticle.compareCustomerInfo(stockArticleEntity);
DistributionStockArticleEntity newStockArticle = new DistributionStockArticleEntity();
BeanUtil.copy(oldStockArticle,newStockArticle);
String consigneePerson = stockArticleEntity.getConsigneePerson();
String customerName = stockArticleEntity.getCustomerName();
if(StringUtil.isNotBlank(consigneePerson)){
newStockArticle.setConsigneePerson(consigneePerson);
newStockArticle.setConsigneeMobile(stockArticleEntity.getConsigneeMobile());
newStockArticle.setConsigneeAddress(stockArticleEntity.getConsigneeAddress());
}else{
newStockArticle.setCustomerName(customerName);
newStockArticle.setCustomerTelephone(stockArticleEntity.getCustomerTelephone());
newStockArticle.setCustomerAddress(stockArticleEntity.getCustomerAddress());
}
String content = oldStockArticle.compareCustomerInfo(newStockArticle);
if(StringUtil.isNotBlank(content)){
distributionOrderCustomerLogService.saveLog(content,2,id);
}

Loading…
Cancel
Save