退料,新购
This commit is contained in:
parent
f93a0d5845
commit
8916b4d19f
|
|
@ -515,4 +515,6 @@ public interface BackApplyInfoMapper {
|
|||
int syncProjectDetails(BackApplyInfo backApplyInfo2);
|
||||
|
||||
BackApplyDetails selectCheckREDetails(BackApplyDetails details);
|
||||
|
||||
BackApplyDetails selectIsFinishByMaId(Long maId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -688,6 +688,17 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
if (dto == null || dto.getBackApplyInfo() == null || CollectionUtils.isEmpty(dto.getBackApplyDetailsList())) {
|
||||
return AjaxResult.error("参数为空,请重新选择后上传!");
|
||||
}
|
||||
//判断编码设备是否已经被新增(未提交)
|
||||
for (BackApplyDetails backApplyDetails : dto.getBackApplyDetailsList()) {
|
||||
if (backApplyDetails.getMaId() != null) {
|
||||
//去check_details表中查该maId的is_finish是否存在0
|
||||
BackApplyDetails backApplyDetails1 = backApplyInfoMapper.selectIsFinishByMaId(backApplyDetails.getMaId());
|
||||
if (backApplyDetails1 != null) {
|
||||
return AjaxResult.error("设备编码" + backApplyDetails.getMaCode() + "已存在未完成退料任务,请勿重复提交!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//对传入的手机号进行校验
|
||||
if (StringUtils.isNotBlank(dto.getBackApplyInfo().getPhone()) && !PhoneUtil.isMobile(dto.getBackApplyInfo().getPhone())) {
|
||||
return AjaxResult.error("手机号格式不正确,请重新填写!");
|
||||
|
|
@ -1305,6 +1316,20 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
}
|
||||
} else if (dto != null && dto.getBackApplyInfo() != null && dto.getBackApplyInfo().getId() != null
|
||||
&& ((dto.getBackApplyDetails() != null) || CollectionUtils.isNotEmpty(dto.getBackApplyDetailsList()))) {
|
||||
|
||||
if (dto.getBackApplyDetails() != null){
|
||||
//判断编码设备是否已经被新增(未提交)
|
||||
for (MaCodeDto maVo : dto.getBackApplyDetails().getMaVos()) {
|
||||
if (maVo.getMaId() != null) {
|
||||
//去check_details表中查该maId的is_finish是否存在0
|
||||
BackApplyDetails backApplyDetails1 = backApplyInfoMapper.selectIsFinishByMaId(maVo.getMaId());
|
||||
if (backApplyDetails1 != null) {
|
||||
return AjaxResult.error("设备编码" + maVo.getMaCode() + "已存在未完成退料任务,请勿重复提交!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dto.getBackApplyDetails() != null) {
|
||||
//编码退料入库
|
||||
dto.getBackApplyInfo().setTypeId(String.valueOf(dto.getBackApplyDetails().getTypeId()));
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ public class PurchaseCheckDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "物资名称--规格parent类型")
|
||||
private String maTypeName;
|
||||
|
||||
@ApiModelProperty(value = "物资类型")
|
||||
private String maTypeModel;
|
||||
|
||||
/** 采购单价(不含税) */
|
||||
@Excel(name = "购置单价(不含税)", sort = 6)
|
||||
@ApiModelProperty(value = "采购单价(不含税)")
|
||||
|
|
|
|||
|
|
@ -1605,4 +1605,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
|
||||
</select>
|
||||
<select id="selectIsFinishByMaId" resultType="com.bonus.material.back.domain.BackApplyDetails">
|
||||
SELECT
|
||||
id AS id,
|
||||
parent_id AS parentId,
|
||||
type_id AS typeId,
|
||||
ma_id as maId
|
||||
FROM
|
||||
back_check_details
|
||||
where is_finished =0
|
||||
<if test="maId != null">
|
||||
and ma_id = #{maId}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="unitName" column="unit_name" />
|
||||
<result property="unitValue" column="unit_value" />
|
||||
<result property="maTypeName" column="ma_type_name" />
|
||||
<result property="maTypeModel" column="ma_type_model" />
|
||||
<result property="purchasePrice" column="purchase_price" />
|
||||
<result property="purchaseTaxPrice" column="purchase_tax_price" />
|
||||
<result property="purchaseNum" column="purchase_num" />
|
||||
|
|
@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="companyId" column="company_id" />
|
||||
<result property="fixCode" column="fix_code" />
|
||||
<result property="manageType" column="manage_type" />
|
||||
<result property="supplierName" column="supplier_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsVo">
|
||||
|
|
@ -48,11 +50,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select pcd.id, pcd.task_id, pcd.type_id, pcd.purchase_price, pcd.purchase_tax_price, pcd.purchase_num, pcd.check_num, pcd.bind_num, pcd.check_result,
|
||||
pcd.supplier_id, pcd.status, pcd.create_by, pcd.production_time, pcd.create_time, pcd.update_by, pcd.update_time,
|
||||
pcd.remark, pcd.check_url_name, pcd.check_url, pcd.input_num, pcd.input_status, pcd.input_time, pcd.file_name,
|
||||
pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mt.unit_value,mtp.type_name as ma_type_name, mt.manage_type as manage_type,
|
||||
pcd.warn_documents as warnDocuments, pcd.reason as reason, mt.rent_price as rentPrice, su.sign_url as signUrl, su.sign_type as signType
|
||||
pcd.file_url, pcd.company_id, pcd.fix_code, mt.type_name, mt.unit_name, mt.unit_value,mtp.type_name as ma_type_name,mtp2.type_name as ma_type_model, mt.manage_type as manage_type,
|
||||
pcd.warn_documents as warnDocuments, pcd.reason as reason, mt.rent_price as rentPrice, su.sign_url as signUrl, su.sign_type as signType,msi.supplier as supplier_name
|
||||
from purchase_check_details pcd
|
||||
left join ma_supplier_info msi on msi.supplier_id = pcd.supplier_id
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mtp on mt.parent_id = mtp.type_id
|
||||
left join ma_type mtp2 on mtp.parent_id = mtp2.type_id
|
||||
left join sys_user su on pcd.check_user = su.user_id
|
||||
</sql>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue