Browse Source

修改出库后退库功能

lwx_dev
erdanergou 3 years ago
parent
commit
25918d9a13
  1. 4
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java
  2. 5
      src/main/java/com/dreamchaser/depository_manage/service/impl/ExcelServiceImpl.java
  3. 6
      target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

4
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java

@ -887,9 +887,9 @@ public class DepositoryRecordController {
SplitInfo splitInfo = splitUnitService.findSplitInfoByMidAndUnit(paramForSplitInfo);
// 获取当前拆单记录与基础单位进制
int splitInfoScaleQuantity = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1);
BigDecimal bg = new BigDecimal(inventory.getPrice() / splitInfoScaleQuantity);
BigDecimal bg = new BigDecimal(inventory.getPrice() / splitInfoScaleQuantity * applicationOutRecordMin.getQuantity());
double newprice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
sumPrice += (newprice * applicationOutRecordMin.getQuantity());
sumPrice += newprice;
}
}
outRecordP.setMcode(mcode.toString());

5
src/main/java/com/dreamchaser/depository_manage/service/impl/ExcelServiceImpl.java

@ -108,17 +108,18 @@ public class ExcelServiceImpl implements ExcelService {
for (ExcelInfo excelVo : excelVos) {
Map<String, Object> param = new HashMap<>();
param.put("mname", excelVo.getMname());
param.put("code", excelVo.getCode());
param.put("unit", excelVo.getUnit());
param.put("version", excelVo.getVersion());
param.put("texture", excelVo.getTexture());
Long typeId = excelVo.getTypeId();
if (typeId != null) {
param.put("materialTypeId", typeId);
param.put("typeId", typeId);
}else{
String typeName = excelVo.getTypeName();
MaterialType materialTypeByName = materialTypeService.findMaterialTypeByName(typeName);
param.put("materialTypeId", materialTypeByName.getOldId());
param.put("typeId", materialTypeByName.getOldId());
}
param.put("id", excelVo.getId());
param.put("brand", excelVo.getBrand());

6
target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

@ -118,6 +118,7 @@
<result column="aorconstructionunitid" property="constructionUnitId" jdbcType="INTEGER"/>
<result column="aoradminorgid" property="adminorgId" jdbcType="INTEGER"/>
<result column="outTime" property="outTime" jdbcType="INTEGER"/>
<result column="editUser" property="editUser" jdbcType="VARCHAR"/>
</resultMap>
@ -171,7 +172,7 @@
<sql id="ApplicationOutRecordInfo">
aorid,mid,mname,depositoryId,dname,applicantId,applicantTime,applyRemark,aorcode,aorpirce,aorquantity,departmenthead,departmentheadPass,departmentHeadTime,departmentheadMessage,
depositoryManager,depositoryManagerPass,depositoryManagerTime,depositoryManagerMessage,aorstate,istransfer,mcode,placeId,pass,aormUnit,aorconstructionunitid,aoradminorgid,cuname,
cuintroduce,cuaddress,outTime,abstract,outType
cuintroduce,cuaddress,outTime,abstract,outType,editUser
</sql>
<sql id="ApplicationOutRecordMinInfo">
@ -1458,6 +1459,9 @@
<if test="outType != null and outType != ''">
outType = #{outType},
</if>
<if test="editUser != null and editUser != ''">
editUser = #{editUser},
</if>
<if test="pass != null and pass != ''">
pass = #{pass}
</if>

Loading…
Cancel
Save