宁夏试运行问题修改
This commit is contained in:
parent
f23f39483f
commit
3be3330714
|
|
@ -46,6 +46,11 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "类型名称")
|
@ApiModelProperty(value = "类型名称")
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
/**
|
||||||
|
* 类型名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "领料出库状态")
|
||||||
|
private String statusName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 规格型号
|
* 规格型号
|
||||||
|
|
|
||||||
|
|
@ -103,4 +103,8 @@ public interface LeaseOutDetailsMapper {
|
||||||
int getmaChineByCt(LeaseOutDetails record);
|
int getmaChineByCt(LeaseOutDetails record);
|
||||||
|
|
||||||
void updateMaTypeNum(LeaseApplyDetails leaseApplyDetails);
|
void updateMaTypeNum(LeaseApplyDetails leaseApplyDetails);
|
||||||
|
|
||||||
|
LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record);
|
||||||
|
|
||||||
|
int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,10 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
// 首先更新领料任务详情表的领料数及状态(lease_apply_details)
|
// 首先更新领料任务详情表的领料数及状态(lease_apply_details)
|
||||||
res = leaseOutDetailsMapper.updateLeaseApplyDetailsOutNum(record);
|
res = leaseOutDetailsMapper.updateLeaseApplyDetailsOutNum(record);
|
||||||
|
LeaseApplyDetails leaseApplyDetails = leaseOutDetailsMapper.getLeaseApplyDetails(record);
|
||||||
|
if (leaseApplyDetails.getPreNum().equals(leaseApplyDetails.getAlNum()) || leaseApplyDetails.getAuditNum().equals(leaseApplyDetails.getAlNum())){
|
||||||
|
leaseOutDetailsMapper.updateLeaseApplyDetails(record);
|
||||||
|
}
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
// 插入领料出库明细表(lease_out_details)
|
// 插入领料出库明细表(lease_out_details)
|
||||||
res = leaseOutDetailsMapper.insertSelective(record);
|
res = leaseOutDetailsMapper.insertSelective(record);
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@
|
||||||
update_by = #{record.updateBy},
|
update_by = #{record.updateBy},
|
||||||
</if>
|
</if>
|
||||||
update_time = now(),
|
update_time = now(),
|
||||||
status = '2'
|
status = '1'
|
||||||
WHERE
|
WHERE
|
||||||
parennt_id = #{record.parentId} and type_id = #{record.typeId}
|
parennt_id = #{record.parentId} and type_id = #{record.typeId}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -315,6 +315,14 @@
|
||||||
WHERE
|
WHERE
|
||||||
type_id = #{typeId}
|
type_id = #{typeId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateLeaseApplyDetails">
|
||||||
|
UPDATE
|
||||||
|
lease_apply_details
|
||||||
|
SET
|
||||||
|
status = '2'
|
||||||
|
WHERE
|
||||||
|
parennt_id = #{record.parentId} and type_id = #{record.typeId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<insert id="insertAgreementInfo">
|
<insert id="insertAgreementInfo">
|
||||||
insert into tm_task_agreement
|
insert into tm_task_agreement
|
||||||
|
|
@ -431,4 +439,15 @@
|
||||||
<select id="getmaChineByCt" resultType="java.lang.Integer">
|
<select id="getmaChineByCt" resultType="java.lang.Integer">
|
||||||
select num from ma_type WHERE type_id = #{typeId}
|
select num from ma_type WHERE type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getLeaseApplyDetails" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
||||||
|
SELECT
|
||||||
|
ifnull( pre_num, 0 ) AS preNum,
|
||||||
|
ifnull( audit_num, 0 ) AS auditNum,
|
||||||
|
ifnull( al_num, 0 ) AS alNum
|
||||||
|
FROM
|
||||||
|
lease_apply_details
|
||||||
|
WHERE
|
||||||
|
parennt_id = #{record.parentId}
|
||||||
|
AND type_id = #{record.typeId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -606,9 +606,26 @@
|
||||||
|
|
||||||
<select id="getLeaseApplyDetails" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
<select id="getLeaseApplyDetails" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
||||||
SELECT
|
SELECT
|
||||||
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
|
lad.*,
|
||||||
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
|
CASE
|
||||||
mt.num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode
|
WHEN lad.`status` = 0 THEN
|
||||||
|
'待出库'
|
||||||
|
WHEN lad.`status` = 1 THEN
|
||||||
|
'出库进行中'
|
||||||
|
WHEN lad.`status` = 2 THEN
|
||||||
|
'已出库'
|
||||||
|
END statusName,
|
||||||
|
mt.type_name AS typeModelName,
|
||||||
|
mt1.type_name AS typeName,
|
||||||
|
mt.unit_name AS unitName,
|
||||||
|
mt.manage_type AS manageType,
|
||||||
|
CASE
|
||||||
|
WHEN mt.manage_type = '0' THEN
|
||||||
|
'编号' ELSE '计数'
|
||||||
|
END manageTypeName,
|
||||||
|
mt.num,
|
||||||
|
(lad.pre_num -IF( lad.al_num IS NULL, '0', lad.al_num )) AS outNum,
|
||||||
|
mm.ma_code AS maCode
|
||||||
FROM
|
FROM
|
||||||
lease_apply_details lad
|
lease_apply_details lad
|
||||||
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
|
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue