Merge branch 'refs/heads/dev_qinhongzhan' into dev
# Conflicts: # mhd-auth/src/main/resources/bootstrap.yml # mhd-gateway/src/main/resources/bootstrap.yml # mhd-modules/mhd-system/src/main/resources/bootstrap.yml # mhd-user-center/src/main/java/com/mhd/user/domain/userAggregate/entity/UserShipperEntity.java # mhd-user-center/src/main/resources/bootstrap.yml # mhd_finance/src/main/java/com/linke/finance/application/server/reconciliation/ReconciliationApplicationService.java # mhd_transport/src/main/java/com/linke/transport/application/service/warehouse/material/command/CreateMaterialCommand.java
This commit is contained in:
+5
@@ -58,6 +58,11 @@ public class InvoiceOrderDomainService
|
||||
*/
|
||||
public int insertInvoiceOrder(InvoiceOrder invoiceOrder)
|
||||
{
|
||||
// 设置当前登录用户的组织信息
|
||||
com.mhd.system.api.model.LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||
invoiceOrder.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
}
|
||||
invoiceOrder.setCreateTime(new Date());
|
||||
invoiceOrder.setCreateBy(SecurityUtils.getUserId());
|
||||
invoiceOrder.setCreateByName(SecurityUtils.getUsername());
|
||||
|
||||
+10
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.linke.finance.domain.receivingAccount.entity.ReceivingAccount;
|
||||
import com.linke.finance.domain.receivingAccount.repository.po.ReceivingAccountPO;
|
||||
import com.linke.finance.domain.receivingAccount.repository.todo.ReceivingAccountDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -46,6 +47,15 @@ public interface ReceivingAccountMapper extends BaseMapper<ReceivingAccount> {
|
||||
*/
|
||||
int deleteAll();
|
||||
|
||||
/**
|
||||
* 根据组织ID删除收款账户(删除当前组织的所有收款账户)
|
||||
*
|
||||
* @param topOrganizationId 一级组织ID
|
||||
* @param organizationId 组织ID
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteByOrganization(@Param("topOrganizationId") String topOrganizationId, @Param("organizationId") String organizationId);
|
||||
|
||||
/**
|
||||
* 根据ID删除收款账户
|
||||
*
|
||||
|
||||
+11
@@ -60,6 +60,17 @@ public class ReceivingAccountRepository {
|
||||
return receivingAccountMapper.deleteAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据组织ID删除收款账户(删除当前组织的所有收款账户)
|
||||
*
|
||||
* @param topOrganizationId 一级组织ID
|
||||
* @param organizationId 组织ID
|
||||
* @return 影响行数
|
||||
*/
|
||||
public int deleteByOrganization(String topOrganizationId, String organizationId) {
|
||||
return receivingAccountMapper.deleteByOrganization(topOrganizationId, organizationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID删除收款账户
|
||||
*
|
||||
|
||||
+17
-50
@@ -389,21 +389,6 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
UserPo userPo=loginUser.getUserPo();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
AjaxResult ajaxResult5=userServiceFeign.getInfo(loginUser.getUserid());
|
||||
if(ajaxResult5.get("code").toString().equals("200")){
|
||||
Object userShipperPo= ajaxResult5.get("data");
|
||||
JSONObject jsonObject = new JSONObject((Map) userShipperPo);
|
||||
|
||||
try {
|
||||
String jsonString = mapper.writeValueAsString(jsonObject);
|
||||
userPo = mapper.readValue(jsonString, UserPo.class);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}else{
|
||||
throw new ServiceException("查询当前登录人用户信息失败");
|
||||
}
|
||||
for (String businessDocumentDetaliId:businessDocumentDetaliIdArray){
|
||||
Reconciliation reconciliation=reconciliationMapper.selectById(businessDocumentDetaliId);
|
||||
if(reconciliation.getSynchronousStatus()==1){
|
||||
@@ -435,15 +420,18 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
TmsTransportNote tmsTransportNote= ajaxResult1.getData();
|
||||
if(ObjectUtil.isNotNull(tmsTransportNote.getIsPaper())){
|
||||
date=tmsTransportNote.getConfirmReceiptTime();
|
||||
if(null==date){
|
||||
date=new Date();
|
||||
}
|
||||
dateString = sdf.format(date);
|
||||
}else{
|
||||
throw new ServiceException("运单还没签收, 先签收");
|
||||
}
|
||||
}
|
||||
if(null==reconciliation.getSettlementPartyId()){
|
||||
/* if(null==reconciliation.getSettlementPartyId()){
|
||||
throw new ServiceException("没有结算方,请核对");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getSalesmanCodeNc())) {
|
||||
}*/
|
||||
/* if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getSalesmanCodeNc())) {
|
||||
throw new ServiceException("请先维护业务员编码");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getMakerCodeNc())) {
|
||||
@@ -451,13 +439,13 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getCustomsCodeNc())) {
|
||||
throw new ServiceException("请先维护制单员编码");
|
||||
}
|
||||
}*/
|
||||
makerCodeNc=tmsOrder.getMakerCodeNc();
|
||||
Ysitem item=new Ysitem();
|
||||
item.setSo_deptid("NG040104");
|
||||
item.setPk_deptid("NG040104");
|
||||
item.setPk_psndoc(tmsOrder.getSalesmanCodeNc());
|
||||
item.setCustomer(tmsOrder.getCustomsCodeNc());
|
||||
item.setCustomer(tmsOrder.getCustomerCodeNc());
|
||||
item.setObjtype("0");
|
||||
item.setDirection("1");
|
||||
item.setScomment(tmsOrder.getAppointShipper());
|
||||
@@ -468,7 +456,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
item.setQuantity_de("0");
|
||||
item.setMoney_de(String.valueOf(tmsOrder.getDeliveryFreight()));
|
||||
item.setMoney_bal(String.valueOf(tmsOrder.getDeliveryFreight()));
|
||||
BigDecimal tax_de=tmsOrder.getDeliveryFreight().multiply(tmsOrder.getTaxRate()).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal tax_de=tmsOrder.getDeliveryFreight().multiply(tmsOrder.getTaxRate().divide(BigDecimal.valueOf(100))).setScale(2,BigDecimal.ROUND_HALF_UP);
|
||||
BigDecimal notax_de=tmsOrder.getDeliveryFreight().subtract(tax_de);
|
||||
item.setNotax_de(String.valueOf(notax_de));
|
||||
item.setLocal_tax_de(String.valueOf(notax_de));
|
||||
@@ -578,28 +566,6 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String [] businessDocumentDetaliIdArray=businessDocumentDetaliIds.split(",");
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
UserPo userPo=loginUser.getUserPo();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
AjaxResult ajaxResult5=userServiceFeign.getInfo(loginUser.getUserid());
|
||||
if(ajaxResult5.get("code").toString().equals("200")){
|
||||
Object userShipperPo= ajaxResult5.get("data");
|
||||
JSONObject jsonObject = new JSONObject((Map) userShipperPo);
|
||||
|
||||
try {
|
||||
String jsonString = mapper.writeValueAsString(jsonObject);
|
||||
userPo = mapper.readValue(jsonString, UserPo.class);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}else{
|
||||
throw new ServiceException("查询当前登录人用户信息失败");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(userPo.getSalespersonNcCode())) {
|
||||
throw new ServiceException("请先维护业务员编码");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(userPo.getDocumentPreparerNcCode())) {
|
||||
throw new ServiceException("请先维护制单员编码");
|
||||
}
|
||||
for (String businessDocumentDetaliId:businessDocumentDetaliIdArray){
|
||||
Reconciliation reconciliation=reconciliationMapper.selectById(businessDocumentDetaliId);
|
||||
if(reconciliation.getSkSynchronousStatus()==1){
|
||||
@@ -621,32 +587,33 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
List<SKitem> ysitemList=new ArrayList<SKitem>();
|
||||
ReconciliationDTO reconciliationDTO=new ReconciliationDTO();
|
||||
reconciliationDTO.setInnerNumber(reconciliation.getInnerNumber());
|
||||
if(null==reconciliation.getSettlementPartyId()){
|
||||
/* if(null==reconciliation.getSettlementPartyId()){
|
||||
throw new ServiceException("没有结算方,请核对");
|
||||
}
|
||||
}*/
|
||||
String makerCodeNc="";
|
||||
R<List<TmsOrder>> result=wlhyServiceFeign.getOrderListByReconciliation(reconciliationDTO);
|
||||
if(result.getCode()==200){
|
||||
List<TmsOrder> list=result.getData();
|
||||
if(ObjectUtil.isNotNull(list)){
|
||||
for(TmsOrder tmsOrder:list){
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getSalesmanCodeNc())) {
|
||||
/* if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getSalesmanCodeNc())) {
|
||||
throw new ServiceException("请先维护业务员编码");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getMakerCodeNc())) {
|
||||
throw new ServiceException("请先维护制单员编码");
|
||||
}
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getCustomsCodeNc())) {
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(tmsOrder.getCustomerCodeNc())) {
|
||||
throw new ServiceException("请先维护制单员编码");
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
makerCodeNc=tmsOrder.getMakerCodeNc();
|
||||
makerCodeNc="xiangna";
|
||||
SKitem item=new SKitem();
|
||||
item.setSo_deptid("NG040104");
|
||||
item.setPk_deptid("NG040104");
|
||||
item.setCheckdirection("ar");
|
||||
item.setPk_psndoc(tmsOrder.getSalesmanCodeNc());
|
||||
item.setCustomer(tmsOrder.getCustomsCodeNc());
|
||||
item.setCustomer(tmsOrder.getCustomerCodeNc());
|
||||
item.setPurchaseorder(tmsOrder.getGoodsNumber());
|
||||
item.setObjtype("0");
|
||||
item.setDirection("1");
|
||||
|
||||
Reference in New Issue
Block a user