代码中金额、数量类型修改

This commit is contained in:
liang.chao 2024-09-05 17:30:31 +08:00
parent 8cbccd557a
commit be630dae22
32 changed files with 96 additions and 98 deletions

View File

@ -188,7 +188,7 @@ public class BackApplyInfo extends BaseEntity {
* rfid编码
*/
private String rfidCode;
private String repairedNum;
private Integer repairedNum;
private String backId;
private String repairer;
@ -279,26 +279,26 @@ public class BackApplyInfo extends BaseEntity {
private String typeId;
@ApiModelProperty(value = "数量")
private String num;
private Integer num;
/**
* 已完成的退料数量
*/
private float finishedBackNum;
private Integer finishedBackNum;
/**
* 未完成的退料数量
*/
private float inCompletedBackNum;
private Integer inCompletedBackNum;
/**
* 此协议号最大剩余退料数 (前台显示 slt_agreement_info 表减去 back_check_details)
*/
private float maxBackNum;
private Integer maxBackNum;
/**
* 此协议号最大剩余退料数 (后台计算,只查 slt_agreement_info )
*/
private float maxBackNumBackend;
private Integer maxBackNumBackend;
@ApiModelProperty(value = "详情id和数量")
private String detailsIdByNum;
@ -360,8 +360,8 @@ public class BackApplyInfo extends BaseEntity {
/**
* 退料数量
*/
private String preNum;
private String auditNum;
private Integer preNum;
private Integer auditNum;
private String typeCn;
/** 前端条件查询所传工程id */
private String proId;

View File

@ -28,13 +28,13 @@ public class DirectApplyDetails extends BaseEntity {
/**
* 直转数量
*/
private String directNum;
private Integer directNum;
private String typeName;
private String kindName;
private String modelName;
private String maCode;
private String unitName;
private String useNum;
private Integer useNum;
private String companyId;
}

View File

@ -109,7 +109,7 @@ public class MaType extends BaseEntity {
/** 库存预警数量 */
@ApiModelProperty(value = "库存预警数量")
private String warnNum;
private Integer warnNum;
/** 库存预警数量 */
@ApiModelProperty(value = "是否计划管理0代表否 1代表是")

View File

@ -7,6 +7,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 表单类型表单集合
* @Author ma_sh
@ -80,7 +82,7 @@ public class MachIneDto {
/** 单价 */
@ApiModelProperty(value = "单价")
private String buyPrice;
private BigDecimal buyPrice;
/** 编码 */
@ApiModelProperty(value = "编码")
@ -126,13 +128,13 @@ public class MachIneDto {
* 数量
*/
@ApiModelProperty(value = "上方页面入库数量")
private Double num;
private Integer num;
/**
* 数量
*/
@ApiModelProperty(value = "数量")
private Double totalNum;
private Integer totalNum;
/**
* 检验人
@ -144,6 +146,6 @@ public class MachIneDto {
* 入库数量
*/
@ApiModelProperty(value = "表单集合入库数量")
private Double putInStoreNum;
private Integer putInStoreNum;
}

View File

@ -15,8 +15,8 @@ public class MachinePart {
private String typeName;
private String modelId;
private Integer parentId;
private Double partNum;
private Double num;
private Integer partNum;
private Integer num;
private Integer typeId;
/** 名称 */
@ApiModelProperty(value = "厂家名称")
@ -26,10 +26,10 @@ public class MachinePart {
* 在用数量
*/
@ApiModelProperty(value = "在用数量")
private Double usNum;
private Integer usNum;
/**
* 总保有量
*/
@ApiModelProperty(value = "总保有量")
private Double allNum;
private Integer allNum;
}

View File

@ -49,7 +49,7 @@ public class SavePutInfoDto extends BaseEntity {
* 数量
*/
@ApiModelProperty(value = "数量")
private Double num;
private Integer num;
/**
* 库房

View File

@ -2,6 +2,7 @@ package com.bonus.sgzb.base.api.domain;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -58,7 +59,7 @@ public class SltAgreementApply {
/**
*结算总费用
*/
private String cost;
private BigDecimal cost;
private String repairIds;
private SltAgreementRelation relation;

View File

@ -50,7 +50,7 @@ public class SltAgreementDetails {
/**
*金额
*/
private String money;
private BigDecimal money;
/**
*是否收费
*/

View File

@ -2,6 +2,7 @@ package com.bonus.sgzb.base.api.domain;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
@ -25,11 +26,11 @@ public class SltAgreementRelation {
/**
*增加费用
*/
private String addCost;
private BigDecimal addCost;
/**
*减免费用
*/
private String subCost;
private BigDecimal subCost;
/**
*增减原因
*/
@ -37,18 +38,18 @@ public class SltAgreementRelation {
/**
*结算总费用
*/
private String cost;
private BigDecimal cost;
/**
*状态0待审核1审核通过2审核驳回
*/
private String status;
private String loseCost;
private String leaseCostOne;
private String leaseCostThree;
private String scrapCost;
private String preScrapCost;
private String repairCost;
private BigDecimal loseCost;
private BigDecimal leaseCostOne;
private BigDecimal leaseCostThree;
private BigDecimal scrapCost;
private BigDecimal preScrapCost;
private BigDecimal repairCost;
private String isSltOne;
private String isSltThree;
/**

View File

@ -315,7 +315,7 @@ public class LogAspect
bmStorageLog.setTaskId(String.valueOf(bai.getTaskId()));
bmStorageLog.setTypeId(Integer.parseInt(bai.getTypeId()));
bmStorageLog.setTypeName(bai.getMaCode());
bmStorageLog.setPreStoreNum(Integer.parseInt(bai.getNum()));
bmStorageLog.setPreStoreNum(bai.getNum());
bmStorageLog.setBackNum(bai.getBackNum());
bmStorageLog.setPassNum(bai.getPassNum());
bmStorageLog.setMaintenanceNum(bai.getMaintenanceNum());

View File

@ -58,7 +58,7 @@ public class LeaseApplyDetails implements Serializable {
* 预领料数
*/
@ApiModelProperty(value = "预领料数")
private Double preNum;
private Integer preNum;
private List<MachinePart> maTypeDetails;
@ -66,17 +66,17 @@ public class LeaseApplyDetails implements Serializable {
* 已领数量
*/
@ApiModelProperty(value = "已领数量")
private Double alNum;
private Integer alNum;
/**
* 此数量是剩余需要出库的数量preNum - alNum
*/
@ApiModelProperty(value = "剩余最大出库数量")
private Double outNum;
private Integer outNum;
/** 审批数量 */
@ApiModelProperty(value = "审批数量")
private Double auditNum;
private Integer auditNum;
/**
* 状态待审批进行中已出库

View File

@ -30,7 +30,7 @@ public class LeaseUserBook {
* 预约数量
*/
@ApiModelProperty(value = "预约数量")
private int bookNum;
private Integer bookNum;
private Long companyId;
private String parentName;
private String typeName;

View File

@ -64,42 +64,42 @@ public class StorageStatus {
*/
@ApiModelProperty(value = "在库数量")
@Excel(name = "在库数量",cellType = Excel.ColumnType.NUMERIC)
private Double num;
private Integer num;
/**
* 在用数量
*/
@ApiModelProperty(value = "在用数量")
@Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC)
private Double usNum;
private Integer usNum;
/**
* 在修数量
*/
@ApiModelProperty(value = "在修数量")
@Excel(name = "在修数量",cellType = Excel.ColumnType.NUMERIC)
private Double repairNum;
private Integer repairNum;
/**
* 修试后待入库
*/
@ApiModelProperty(value = "修试后待入库")
@Excel(name = "修试后待入库",cellType = Excel.ColumnType.NUMERIC)
private Double repairInputNum;
private Integer repairInputNum;
/**
* 新购待入库
*/
@ApiModelProperty(value = "新购待入库")
@Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC)
private Double inputNum;
private Integer inputNum;
/**
* 总保有量
*/
@ApiModelProperty(value = "总保有量")
@Excel(name = "总保有量",cellType = Excel.ColumnType.NUMERIC)
private Double allNum;
private Integer allNum;
/**
* 是否计数
@ -114,14 +114,14 @@ public class StorageStatus {
*/
@ApiModelProperty(value = "租赁数量")
@Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC)
private Double outNum;
private Integer outNum;
/**
* 归还数量
*/
@ApiModelProperty(value = "归还数量")
@Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC)
private Double backNum;
private Integer backNum;
/**

View File

@ -64,7 +64,7 @@ public class TmTask implements Serializable {
* 库存
*/
@ApiModelProperty(value = "库存")
private Double num;
private Integer num;
/**
* 费用承担方
@ -263,7 +263,7 @@ public class TmTask implements Serializable {
private String status;
private String maStatus;
private String typeId;
private Double partNum;
private Integer partNum;
@ApiModelProperty(value = "预计领料时间(重庆)")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")

View File

@ -125,7 +125,7 @@ public class AppBackApplyServiceImpl implements AppBackApplyService {
typeIds.removeIf(item -> item == null);
for (TmTask typeId : typeIds) {
MachinePart machinePart = appBackApplyMapper.getMachineParts(typeId);
machinePart.setPartNum((typeId.getPartNum() * Double.parseDouble(backApplyInfo.getPreNum())));
machinePart.setPartNum(typeId.getPartNum() * backApplyInfo.getPreNum());
machineParts.add(machinePart);
}
backApplyInfo.setMaTypeDetails(machineParts);

View File

@ -58,7 +58,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
machinePart.setParentId(record.getId().intValue());
int countMachineByPidAndTid = tmTaskMapper.getCountMachineByPidAndTid(machinePart);
Double machinePartNum = typeId.getPartNum() * Double.parseDouble(backApplyInfo.getAuditNum());
Integer machinePartNum = typeId.getPartNum() * backApplyInfo.getAuditNum();
count1 += machinePartNum;
count2 += countMachineByPidAndTid;
machinePart.setPartNum(machinePartNum - countMachineByPidAndTid);
@ -68,7 +68,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
if (count1 == count2) {
backApplyInfo.setPartNum(0);
} else {
backApplyInfo.setPartNum((int) Double.parseDouble(backApplyInfo.getAuditNum()));
backApplyInfo.setPartNum(backApplyInfo.getAuditNum());
}
}
}
@ -162,7 +162,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
BackApplyInfo b = allList1.get(0);
record.setTypeId(b.getTypeId());
int num = backReceiveMapper.getmaChineByCt(record);
record.setNum(String.valueOf(num));
record.setNum(num);
}
//先判断是否已经完成退料了

View File

@ -513,7 +513,7 @@ public class TmTaskServiceImpl implements TmTaskService {
// 去查询领料任务详情表
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo);
if (leaseApplyDetails.size() > 0) {
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
/* for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
List<MachinePart> machineParts = new ArrayList<>();
List<TmTask> typeIds = tmTaskMapper.getMaTypeDetails(leaseApplyDetail);
typeIds.removeIf(item -> item == null);
@ -523,7 +523,7 @@ public class TmTaskServiceImpl implements TmTaskService {
machineParts.add(machinePart);
}
leaseApplyDetail.setMaTypeDetails(machineParts);
}
}*/
listLeaseDetails.addAll(leaseApplyDetails);
}
}

View File

@ -33,7 +33,7 @@ public class MaHouseSet {
* 数量
*/
@ApiModelProperty(value= "数量")
private String num;
private Integer num;
/**
* 帐号状态0正常 1停用
*/
@ -131,11 +131,11 @@ public class MaHouseSet {
}
public String getNum() {
public Integer getNum() {
return num;
}
public void setNum(String num) {
public void setNum(Integer num) {
this.num = num;
}

View File

@ -37,7 +37,7 @@ public class MaPartType extends BaseEntity {
//实时库存
@Excel(name = "实时库存")
private String num;
private Integer num;
//计量单位ID
@Excel(name = "计量单位ID")
@ -53,7 +53,7 @@ public class MaPartType extends BaseEntity {
//库存预警数量
@Excel(name = "库存预警数量")
private String warnNum;
private Integer warnNum;
//删除标志0代表存在 2代表删除
@Excel(name = "删除标志0代表存在 2代表删除")

View File

@ -10,23 +10,23 @@ import lombok.Data;
public class ScrapAnalysisVo {
/** 计划退料数量*/
private double planNum;
private Integer planNum;
/** 实际退料数量*/
private double realityNum;
private Integer realityNum;
/** 维修总量*/
private double repairNum;
private Integer repairNum;
/** 维修合格*/
private double repairedNum;
private Integer repairedNum;
/** 维修报废数量*/
private double scrapNum;
private Integer scrapNum;
/** 数量*/
private double num;
private Integer num;
/** 数量2*/
private double num2;
private Integer num2;
/** 机具类型名称*/
private String typeName;

View File

@ -137,11 +137,11 @@ public class BackApplyController extends BaseController {
/**
* 退料申请详情修改
*/
@ApiOperation(value = "退料申请详情修改")
/* @ApiOperation(value = "退料申请详情修改")
@PostMapping("/setModify")
public AjaxResult setModify(@RequestBody List<BackApplyInfo> bean) {
return backApplyService.setModify(bean);
}
}*/
/**
* 退料申请删除

View File

@ -28,7 +28,7 @@ public class BackApplyDto {
@ApiModelProperty(value="同一退料单中不同器具状态")
private String status;
private String auditNum;
private Integer auditNum;
/** 创建者 */
@ApiModelProperty(value = "创建者")

View File

@ -40,7 +40,7 @@ public class InputApplyDetails extends BaseEntity
private Integer inputNum;
/** 入库类型1新购2退料3修试后4盘点 */
@Excel(name = "入库类型", readConverterExp = "1=新购2退料3修试后4盘点")
@Excel(name = "入库类型", readConverterExp = "1=新购,2=退料,3=修试后,4=盘点")
private String inputType;
/** 数据所属组织 */

View File

@ -228,7 +228,7 @@ public class TmTask implements Serializable {
@ApiModelProperty(value = "分管审批备注")
private String deptAuditRemark;
private String partNum;
private Integer partNum;
private String typeId;
/**

View File

@ -43,7 +43,7 @@ public interface InventoryAndWarehousingMapper {
* @param num
* @return
*/
int updateMaType(@Param("typeId") String typeId, @Param("num") Double num);
int updateMaType(@Param("typeId") String typeId, @Param("num") Integer num);
/**
* 新增ma_machine表

View File

@ -75,13 +75,6 @@ public interface BackApplyService {
List<BackApplyInfo> getView(BackApplyInfo bean);
List<BackApplyInfo> getViewByApply(BackApplyInfo bean);
/**
* 退料申请详情修改
* @param bean
* @return
*/
AjaxResult setModify(List<BackApplyInfo> bean);
/**
* 删除
* @param bean

View File

@ -142,7 +142,8 @@ public class BackApplyServiceImpl implements BackApplyService {
bean.setCompanyId(companyId.toString());
}
List<BackApplyInfo> view = backApplyMapper.getView(bean);
return getMaTypeDetails(view);
// return getMaTypeDetails(view);
return view;
}
private List<BackApplyInfo> getMaTypeDetails(List<BackApplyInfo> view) {
@ -153,7 +154,7 @@ public class BackApplyServiceImpl implements BackApplyService {
typeIds.removeIf(item -> item == null);
for (TmTask typeId : typeIds) {
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
machinePart.setPartNum((Double.parseDouble(typeId.getPartNum()) * Double.parseDouble(backApplyInfo.getPreNum())));
machinePart.setPartNum(typeId.getPartNum() * backApplyInfo.getPreNum());
machineParts.add(machinePart);
}
backApplyInfo.setMaTypeDetails(machineParts);
@ -178,11 +179,11 @@ public class BackApplyServiceImpl implements BackApplyService {
}
@Override
/* @Override
public AjaxResult setModify(List<BackApplyInfo> bean) {
if (CollUtil.isNotEmpty(bean)) {
for (BackApplyInfo backApplyInfo : bean) {
if (!StringUtils.isEmpty(backApplyInfo.getDetailsId()) && !StringUtils.isEmpty(backApplyInfo.getNum())) {
if (!StringUtils.isEmpty(backApplyInfo.getDetailsId()) && !(backApplyInfo.getNum() == null)) {
String[] detailsId = backApplyInfo.getDetailsId().split(",");
String[] num = backApplyInfo.getNum().split(",");
for (int i = 0; i < detailsId.length; i++) {
@ -202,7 +203,7 @@ public class BackApplyServiceImpl implements BackApplyService {
}
return AjaxResult.success("修改成功");
}
}*/
@Override
public AjaxResult del(BackApplyInfo bean) {

View File

@ -251,7 +251,7 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
* @param num
* @return
*/
private int updateMaTypeInfo(String typeId, Double num) {
private int updateMaTypeInfo(String typeId, Integer num) {
return inventoryAndWarehousingMapper.updateMaType(typeId, num);
}
@ -263,10 +263,10 @@ public class InventoryAndWarehousingServiceImpl implements InventoryAndWarehousi
*/
private int insertPutInfo(SavePutInfoDto dto, String code) {
int res = 0;
Double total = dto.getMachIneDtoList().stream()
Integer total = dto.getMachIneDtoList().stream()
.map(MachIneDto::getPutInStoreNum)
.filter(num -> num != null)
.collect(Collectors.summingDouble(Double::doubleValue));
.collect(Collectors.summingInt(Integer::intValue));
if (CollectionUtils.isNotEmpty(dto.getMachIneDtoList())) {
MachIneDto machIneDto = dto.getMachIneDtoList().get(0);
machIneDto.setCode(code);

View File

@ -288,12 +288,12 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
} else {
relation.setIsSltThree("0");
}
relation.setLeaseCostOne(leaseCostOne.toString());
relation.setLeaseCostThree(leaseCostThree.toString());
relation.setRepairCost(repairCost.toString());
relation.setScrapCost(scrapCost.toString());
relation.setPreScrapCost(preScrapCost.toString());
relation.setLoseCost(loseCost.toString());
relation.setLeaseCostOne(leaseCostOne);
relation.setLeaseCostThree(leaseCostThree);
relation.setRepairCost(repairCost);
relation.setScrapCost(scrapCost);
relation.setPreScrapCost(preScrapCost);
relation.setLoseCost(loseCost);
relations.add(relation);
}
return relations;

View File

@ -260,8 +260,8 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
for (BackApplyInfo leaseApplyDetails : leaseApplyDetailsList) {
//设置领料任务ID
leaseApplyDetails.setId(backApplyInfoId);
leaseApplyDetails.setNum(leaseApplyDetails.getDirectNum().toString());
leaseApplyDetails.setAuditNum(leaseApplyDetails.getDirectNum().toString());
leaseApplyDetails.setNum(leaseApplyDetails.getDirectNum());
leaseApplyDetails.setAuditNum(leaseApplyDetails.getDirectNum());
// 插入领料任务明细
boolean addLeaseTaskDetailsResult = backApplyService.upload(leaseApplyDetails) > 0;
if (!addLeaseTaskDetailsResult) {

View File

@ -360,8 +360,8 @@
update_time, remark, company_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.parenntId,jdbcType=INTEGER}, #{item.typeId,jdbcType=INTEGER}, #{item.preNum,jdbcType=FLOAT},
#{item.alNum,jdbcType=FLOAT}, #{item.status,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
(#{item.parenntId,jdbcType=INTEGER}, #{item.typeId,jdbcType=INTEGER}, #{item.preNum,jdbcType=INTEGER},
#{item.alNum,jdbcType=INTEGER}, #{item.status,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
NOW(), #{item.updateBy,jdbcType=VARCHAR}, NOW(),
#{item.remark,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER})
</foreach>

View File

@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="houseId != null and houseId != 0">house_id,</if>
<if test="typeId != null and typeId != ''">type_id,</if>
<if test="maId != null and maId != 0">ma_id,</if>
<if test="num != null and num != ''">num,</if>
<if test="num != null">num,</if>
<if test="status != null and status != 0">status,</if>
<if test="deptId != null and deptId != ''">dept_id,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="houseId != null and houseId != 0">#{houseId},</if>
<if test="typeId != null and typeId != ''">#{typeId},</if>
<if test="maId != null and maId != 0">#{maId},</if>
<if test="num != null and num != ''">#{num},</if>
<if test="num != null">#{num},</if>
<if test="status != null and status != 0">#{status},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>