Merge remote-tracking branch 'origin/orderChange' into zhairh

zhairh
x_z 3 years ago
commit a57a43b25c

@ -35,10 +35,7 @@ import com.glxp.sale.admin.res.inout.WarehouseUserResponse;
import com.glxp.sale.admin.res.inventory.InvBusUserResponse; import com.glxp.sale.admin.res.inventory.InvBusUserResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService; import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.auth.CustomerService; import com.glxp.sale.admin.service.auth.CustomerService;
import com.glxp.sale.admin.service.basic.BasicUnitMaintainService; import com.glxp.sale.admin.service.basic.*;
import com.glxp.sale.admin.service.basic.BussinessTypeService;
import com.glxp.sale.admin.service.basic.UdiInfoService;
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
import com.glxp.sale.admin.service.info.CompanyProductRelevanceService; import com.glxp.sale.admin.service.info.CompanyProductRelevanceService;
import com.glxp.sale.admin.service.info.CompanyService; import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.service.inout.*; import com.glxp.sale.admin.service.inout.*;
@ -111,6 +108,8 @@ public class WareHouseController {
@Resource @Resource
UdiInfoUtils udiInfoUtils; UdiInfoUtils udiInfoUtils;
@Resource
private CustomService customService;
@ -1098,7 +1097,7 @@ public class WareHouseController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
//计算实际数量 //计算实际数量
int reCount= udiInfoUtils.getActCount(warehouseEntity); int reCount= customService.getActCount(warehouseEntity);
warehouseEntity.setReCount(reCount); warehouseEntity.setReCount(reCount);
boolean b = codesTempService.update(warehouseEntity); boolean b = codesTempService.update(warehouseEntity);
if (warehouseEntity.getMySupId() != null) { if (warehouseEntity.getMySupId() != null) {

@ -90,9 +90,9 @@ public class ThrProductsAddController {
} }
ThrProductsAddEntity tempEntity = thrProductsAddService.selectById(thrProductsAddEntity.getId() + ""); ThrProductsAddEntity tempEntity = thrProductsAddService.selectById(thrProductsAddEntity.getId() + "");
if (!thrProductsService.isExit(tempEntity.getCode(), tempEntity.getThirdSysFk())) { // if (thrProductsService.isExit(tempEntity.getCode(), tempEntity.getThirdSysFk())) {
return ResultVOUtils.error(500, "已存在相同产品编码,无法添加!"); // return ResultVOUtils.error(500, "已存在相同产品编码,无法添加!");
} // }
thrProductsAddService.updateThrProducts(thrProductsAddEntity); thrProductsAddService.updateThrProducts(thrProductsAddEntity);
if (thrProductsAddEntity.getCheckStatus() == 2) { if (thrProductsAddEntity.getCheckStatus() == 2) {
ThrProductsEntity thrProductsEntity = new ThrProductsEntity(); ThrProductsEntity thrProductsEntity = new ThrProductsEntity();

@ -248,7 +248,7 @@ public class ThrProductsAddDiController {
} }
ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiService.filterThrProductsGetId(Integer.valueOf(deleteRequest.getId())); ThrProductsAddDiEntity thrProductsAddDiEntity = thrProductsAddDiService.filterThrProductsGetId(Integer.valueOf(deleteRequest.getId()));
if (thrProductsAddDiEntity != null) { if (thrProductsAddDiEntity != null) {
if (thrProductsAddDiEntity.getStatus() != 1) { if (thrProductsAddDiEntity.getStatus() == 2) {
return ResultVOUtils.error(877, "审批状态发生改变请刷新页面重新操作!"); return ResultVOUtils.error(877, "审批状态发生改变请刷新页面重新操作!");
} }
} }

@ -27,9 +27,17 @@ public class FilterInvProductDetailRequest extends ListPageRequest {
private String orderIdFk; private String orderIdFk;
private String invStorageCode; private String invStorageCode;
private String invWarehouseCode; private String invWarehouseCode;
private String invSpaceCode; private String invSpaceCode;
private List<String> invCodes; private List<String> invCodes;
//更新时间
private String updateTime;
/**
* ID
*/
private List<String> productIdList;
} }

@ -0,0 +1,37 @@
package com.glxp.sale.admin.service.basic;
import com.glxp.sale.admin.entity.inout.WarehouseEntity;
import com.glxp.sale.admin.res.basic.UdiRelevanceResponse;
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class CustomService {
@Resource
UdiRelevanceService udiRelevanceService;
public int getActCount(WarehouseEntity warehouseEntity) {
UdiRelevanceResponse udiInfoBean;
if (warehouseEntity.getRelId() != null) {
udiInfoBean = udiRelevanceService.selectGroupById(warehouseEntity.getRelId());
} else
udiInfoBean = udiRelevanceService.selectByNameCode(warehouseEntity.getNameCode());
if (udiInfoBean != null) {
if (udiInfoBean.getIsUseDy() == 1 && udiInfoBean.getDiType() != 2) {
if (udiInfoBean.getBhzxxsbzsl() == 0)
return udiInfoBean.getZxxsbzbhsydysl();
else
return udiInfoBean.getZxxsbzbhsydysl() * udiInfoBean.getBhzxxsbzsl();
} else {
return udiInfoBean.getBhzxxsbzsl();
}
}
return 1;
}
}

@ -31,8 +31,8 @@
customer_contact.contacts,customer_contact.mobile,customer_info.userMax,customer_contact.email,customer_contact.tel,customer_info.companyName customer_contact.contacts,customer_contact.mobile,customer_info.userMax,customer_contact.email,customer_contact.tel,customer_info.companyName
,auth_role.`name` role ,auth_role.`name` role
FROM customer_info FROM customer_info
INNER JOIN customer_contact on customer_info.customerId=customer_contact.customerId left JOIN customer_contact on customer_info.customerId=customer_contact.customerId
INNER JOIN auth_role on customer_info.roleId = auth_role.id left JOIN auth_role on customer_info.roleId = auth_role.id
<where> <where>
<if test="customerName != null and ''!=customerName"> <if test="customerName != null and ''!=customerName">
AND customer_info.customerName LIKE concat('%',#{customerName},'%') AND customer_info.customerName LIKE concat('%',#{customerName},'%')

@ -41,7 +41,7 @@
AND supId = #{supId} AND supId = #{supId}
</if> </if>
<if test="code != '' and code != null"> <if test="code != '' and code != null">
AND code = #{code} AND originCode = #{code}
</if> </if>
<if test="originCode != '' and originCode != null"> <if test="originCode != '' and originCode != null">
AND originCode = #{originCode} AND originCode = #{originCode}
@ -52,9 +52,21 @@
<if test="invWarehouseCode != '' and invWarehouseCode != null"> <if test="invWarehouseCode != '' and invWarehouseCode != null">
AND invWarehouseCode = #{invWarehouseCode} AND invWarehouseCode = #{invWarehouseCode}
</if> </if>
<if test="invSpaceCode != null and invSpaceCode != ''">
AND invSpaceCode = #{invSpaceCode}
</if>
<if test="orderIdFk != null and orderIdFk != ''"> <if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk} AND orderIdFk = #{orderIdFk}
</if> </if>
<if test="productIdList != null and productIdList.size() != 0">
AND productIdFk in
<foreach collection="productIdList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="updateTime != null and updateTime != ''">
AND updateTime <![CDATA[ <= ]]> #{updateTime}
</if>
</where> </where>
</select> </select>

@ -40,7 +40,7 @@
AND checkStatus = #{checkStatus} AND checkStatus = #{checkStatus}
</if> </if>
<if test="customerId != '' and customerId != null"> <if test="customerId != '' and customerId != null">
AND customerId = #{customerId} AND thr_products_add.customerId = #{customerId}
</if> </if>
<if test="companyName != '' and companyName != null"> <if test="companyName != '' and companyName != null">
AND companyName = #{companyName} AND companyName = #{companyName}

Loading…
Cancel
Save