Merge remote-tracking branch 'origin/fengcang' into fengcang

fengcang
x_z 3 years ago
commit 47166a8bc7

@ -37,6 +37,7 @@ import com.glxp.api.admin.service.inventory.StockPrintTempService;
import com.glxp.api.admin.thread.IoTransInoutService;
import com.glxp.api.admin.thread.JaspaperService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.FileUtils;
import com.glxp.api.admin.util.JasperUtils;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
@ -52,6 +53,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -170,6 +172,9 @@ public class StockQRCodeTextController {
if (printEntities.size() > 1000) { //如果标签打印数据大于1000则切割生成多个文件
if (!FileUtils.isFileExist(dirPath + "/pdfprint")) {
new File(dirPath + "/pdfprint").mkdirs();
}
List<List<StockPrintEntity>> splits = CustomUtil.splitList(printEntities, 100);
int index = 0;
List<StockPrintTempEntity> stockPrintTempEntities = new ArrayList<>();
@ -257,7 +262,9 @@ public class StockQRCodeTextController {
printEntities.add(stockPrintEntity);
}
}
if (!FileUtils.isFileExist(dirPath + "/pdfprint")) {
new File(dirPath + "/pdfprint").mkdirs();
}
List<List<StockPrintEntity>> splits = CustomUtil.splitList(printEntities, 100);
int index = 0;
List<StockPrintTempEntity> stockPrintTempEntities = new ArrayList<>();

@ -553,14 +553,20 @@ public class OrderDetailController {
erpOrderEntity.setInvWarehouseCode(purchaseinResponse.getInvWarehouseCode());
erpOrderEntity.setLocStorageCode(purchaseinResponse.getLocStorageCode());
erpOrderEntity.setGoodsunit(subPurchase.getSpec());
erpOrderEntity.setBillType(purchaseinResponse.getBillType());
erpOrderEntity.setBindRlFk(subPurchase.getRelId());
erpOrderEntities.add(erpOrderEntity);
}
}
}
if (erpOrderEntities != null && erpOrderEntities.size() > 0) {
AuthAdmin authAdmin = customerService.getUserBean();
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
orderFilterRequest.setId(importErpOrderRequest.getOrderId());
OrderEntity orderEntity = orderService.findOne(orderFilterRequest);
orderEntity.setReviewUser(authAdmin.getId().intValue());
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(orderEntity.getAction());
ErpOrderEntity temp = erpOrderEntities.get(0);
for (int i = 0; i < erpOrderEntities.size(); i++) {
if (!temp.getCompanyname().equals(erpOrderEntities.get(i).getCompanyname())) {
@ -575,12 +581,15 @@ public class OrderDetailController {
if (!temp.getInvWarehouseCode().equals(erpOrderEntities.get(i).getInvWarehouseCode())) {
return ResultVOUtils.error(500, "所选业务单据当前分库不一致!");
}
if (!bussinessTypeEntity.getLocalAction().equals(erpOrderEntities.get(i).getBillType())) {
return ResultVOUtils.error(500, "所选单据类型不一致!");
}
}
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
orderFilterRequest.setId(importErpOrderRequest.getOrderId());
OrderEntity orderEntity = orderService.findOne(orderFilterRequest);
orderEntity.setReviewUser(authAdmin.getId().intValue());
ErpOrderEntity exitErp = new ContrastErpUtil().vailErpExit(orderDetailService, erpOrderEntities, importErpOrderRequest.getOrderId());
if (exitErp != null) {
String errMsg = "所选业务单据" + exitErp.getErpOrderId() + "已被其他出入库单" + exitErp.getOrderIdFk() + "绑定";

@ -60,7 +60,7 @@ public class ErpOrderEntity {
private String locStorageCode;
private String invWarehouseCode;//当前分库
private String fromSubInvCode; //往来分库
private String billType;
public Integer getBindStatus() {
if (bindStatus == null)

@ -37,5 +37,6 @@ public class StockOrderFilterRequest extends ListPageRequest {
private Integer unionUser;
private String entrustUser;
private boolean entrustEnd;
private String localAction;
}

@ -89,7 +89,7 @@
#{createTime},
#{userFlag,jdbcType=INTEGER},
#{lastModifyTime},
#{employeeName},#{locInvCode},#{locSubInvCode}))
#{employeeName},#{locInvCode},#{locSubInvCode})
</insert>
<insert id="replaceAuthAdmin" keyProperty="id" parameterType="com.glxp.api.admin.entity.auth.AuthAdmin">

@ -141,7 +141,7 @@
and statusInfo = #{statusInfo}
</if>
<if test="type != '' and type!=null">
and type = #{type}
and `type` = #{type}
</if>
<if test="sourceType != '' and sourceType!=null">
and sourceType = #{sourceType}
@ -149,10 +149,14 @@
<if test="printStatus != '' and printStatus!=null">
and printStatus = #{printStatus}
</if>
<if test="localAction != '' and localAction!=null">
and billType = #{localAction}
</if>
<if test="unitIdFk != '' and unitIdFk!=null">
and unitIdFk = #{unitIdFk}
</if>
<if test="userId!=null">
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
invWarehouseCode is null or

Loading…
Cancel
Save