物资类型修改
This commit is contained in:
parent
eb8fefed2e
commit
e8db3d7f9c
|
|
@ -71,7 +71,7 @@ public class BmUnitPersonServiceImpl implements IBmUnitPersonService
|
|||
/**
|
||||
* 删除往来单位管理信息
|
||||
*
|
||||
* @param unitId 往来单位管理主键
|
||||
* @param bmUnitPerson 往来单位管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -113,6 +113,9 @@ public class PartLeaseServiceImpl implements PartLeaseService {
|
|||
*/
|
||||
@Override
|
||||
public int updatePartLeaseInfo(PartLeaseInfo partLeaseInfo) {
|
||||
if (null == partLeaseInfo || null == partLeaseInfo.getTaskId()) {
|
||||
throw new ServiceException("领用信息或任务ID不能为空");
|
||||
}
|
||||
partLeaseInfo.setCode(null);
|
||||
switch (partLeaseInfo.getStatus()) {
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@ public class Type extends BaseEntity {
|
|||
@ApiModelProperty(value = "是否扣费,0:扣费, 1:不扣费")
|
||||
private Byte isCharging = 1;
|
||||
|
||||
@ApiModelProperty(value = "是否试验,0:未试验, 1:已试验")
|
||||
private Byte isTest = 0;
|
||||
|
||||
/** 检验周期 */
|
||||
@ApiModelProperty(value = "检验周期,单位:月")
|
||||
private Integer testCycle = 0;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
Long maId = inputDetails.getMaId();
|
||||
BigDecimal repairNum = inputDetails.getRepairedNum();
|
||||
// 创建修饰后入库任务
|
||||
if (repairNum.compareTo(b) > 0) {
|
||||
if (0 < repairNum.compareTo(b)) {
|
||||
// 添加修试后入库任务
|
||||
RepairInputDetails repairInputDetails = new RepairInputDetails();
|
||||
repairInputDetails.setTaskId(inputTaskId);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
@RestController
|
||||
@RequestMapping("/slt_agreement_info")
|
||||
public class SltAgreementInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISltAgreementInfoService sltAgreementInfoService;
|
||||
|
||||
|
|
|
|||
|
|
@ -210,13 +210,13 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
leaseList.addAll(oneOfList);
|
||||
}
|
||||
for (SltAgreementInfo bean : leaseList) {
|
||||
if (bean.getLeasePrice() == null) {
|
||||
if (null == bean.getLeasePrice()) {
|
||||
bean.setLeasePrice(BigDecimal.valueOf(0.00));
|
||||
}
|
||||
if (bean.getNum() == null) {
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
}
|
||||
if (bean.getLeaseDay() == null) {
|
||||
if (null == bean.getLeaseDay()) {
|
||||
bean.setLeaseDay(0L);
|
||||
}
|
||||
BigDecimal leasePrice = bean.getLeasePrice();
|
||||
|
|
@ -231,10 +231,9 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
public List<SltAgreementInfo> getRepairList(List<SltAgreementInfo> list) {
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
Integer taskType = TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId();
|
||||
//String taskType = TaskTypeEnum.MAINTENANCE_TASK.getCode();
|
||||
for (SltAgreementInfo bean : list) {
|
||||
List<TmTask> taskList = taskMapper.getTaskList(bean, taskType);
|
||||
if (taskList != null && taskList.size() > 0) {
|
||||
if (null != taskList && !taskList.isEmpty()) {
|
||||
List<SltAgreementInfo> repairDetailsList = sltAgreementInfoMapper.getRepairDetailsList(taskList);
|
||||
repairList.addAll(repairDetailsList);
|
||||
}
|
||||
|
|
@ -245,33 +244,25 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
public List<SltAgreementInfo> getScrapList(List<SltAgreementInfo> list) {
|
||||
List<SltAgreementInfo> scrapList = new ArrayList<>();
|
||||
Integer taskType = TmTaskTypeEnum.TM_TASK_SCRAP.getTaskTypeId();
|
||||
//String taskType = TaskTypeEnum.SCRAP_TASK.getCode();
|
||||
for (SltAgreementInfo bean : list) {
|
||||
List<TmTask> taskList = taskMapper.getTaskList(bean, taskType);
|
||||
if (taskList != null && taskList.size() > 0) {
|
||||
if (null != taskList && !taskList.isEmpty()) {
|
||||
List<SltAgreementInfo> scrapDetailsList = sltAgreementInfoMapper.getScrapDetailsList(taskList);
|
||||
scrapList.addAll(scrapDetailsList);
|
||||
}
|
||||
}
|
||||
if (scrapList != null && scrapList.size() > 0) {
|
||||
if (!scrapList.isEmpty()) {
|
||||
for (SltAgreementInfo bean : scrapList) {
|
||||
|
||||
if (bean.getBuyPrice() == null) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
}
|
||||
if (bean.getNum() == null) {
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
}
|
||||
BigDecimal buyPrice = bean.getBuyPrice();
|
||||
BigDecimal num = bean.getNum();
|
||||
BigDecimal costs = buyPrice.multiply(num);
|
||||
//计算总金额
|
||||
/*BigDecimal costs = BigDecimal.ZERO;
|
||||
if (bean.getBuyPrice() != null && bean.getBuyPrice() != null){
|
||||
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
|
||||
BigDecimal num = new BigDecimal(bean.getNum());
|
||||
costs = buyPrice.multiply(num);
|
||||
}*/
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
}
|
||||
|
|
@ -285,10 +276,10 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
loseList.addAll(oneOfList);
|
||||
}
|
||||
for (SltAgreementInfo bean : loseList) {
|
||||
if (bean.getBuyPrice() == null) {
|
||||
if (null == bean.getBuyPrice()) {
|
||||
bean.setBuyPrice(BigDecimal.valueOf(0.00));
|
||||
}
|
||||
if (bean.getNum() == null) {
|
||||
if (null == bean.getNum()) {
|
||||
bean.setNum(BigDecimal.valueOf(0L));
|
||||
}
|
||||
BigDecimal buyPrice = bean.getBuyPrice();
|
||||
|
|
@ -296,12 +287,6 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
// 原价 x 数量
|
||||
BigDecimal costs = buyPrice.multiply(num);
|
||||
//计算租赁费用
|
||||
/*BigDecimal costs = BigDecimal.ZERO;
|
||||
if (bean.getBuyPrice() != null && bean.getNum() != null){
|
||||
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());
|
||||
BigDecimal num = new BigDecimal(bean.getNum());
|
||||
costs = buyPrice.multiply(num);
|
||||
}*/
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
return loseList;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="remark" column="remark" />
|
||||
<result property="facModel" column="fac_model" />
|
||||
<result property="intelligentCode" column="intelligent_code" />
|
||||
<result property="isTest" column="is_test" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.material.ma.domain.vo.MaTypeVo" id="MaTypeVoResult">
|
||||
|
|
@ -163,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t.model_code,t.unit_id,t.unit_name,t.unit_value,t.sort_num,t.manage_type,t.lease_price,t.eff_time,
|
||||
t.rent_price,t.buy_price,t.pay_ratio,t.pay_price,t.tax_ratio,t.level,t.rated_load,t.test_load,
|
||||
t.holding_time,t.warn_num,t.create_by,t.create_time,t.update_by,t.update_time,t.is_plan,
|
||||
t.is_ancuo,t.remark,t.fac_model,t.intelligent_code,
|
||||
t.is_ancuo,t.remark,t.fac_model,t.intelligent_code,t.is_test,
|
||||
GROUP_CONCAT(distinct su.user_name) as keeper_nick_name,
|
||||
GROUP_CONCAT(distinct su.user_id) as keeperId,
|
||||
GROUP_CONCAT(distinct su2.user_name) as repair_nick_name,
|
||||
|
|
@ -246,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="remark != null">remark,</if>
|
||||
<if test="facModel != null">fac_model,</if>
|
||||
<if test="intelligentCode != null">intelligent_code,</if>
|
||||
<if test="isTest != null">is_test,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||
|
|
@ -279,6 +281,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="remark != null">#{remark},</if>
|
||||
<if test="facModel != null">#{facModel},</if>
|
||||
<if test="intelligentCode != null">#{intelligentCode},</if>
|
||||
<if test="isTest != null">#{isTest},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -315,6 +318,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="facModel != null">fac_model = #{facModel},</if>
|
||||
<if test="intelligentCode != null">intelligent_code = #{intelligentCode},</if>
|
||||
<if test="isTest != null">is_test = #{isTest},</if>
|
||||
</trim>
|
||||
where type_id = #{typeId}
|
||||
</update>
|
||||
|
|
|
|||
Loading…
Reference in New Issue