出门证优化

This commit is contained in:
mashuai 2025-10-28 16:48:54 +08:00
parent 99d867ea4e
commit 7902b21197
12 changed files with 102 additions and 12 deletions

View File

@ -597,6 +597,17 @@ public class BackApplyInfoController extends BaseController {
}
@ApiOperation(value = "出门证领料单号下拉")
@GetMapping("/getCodeList")
public AjaxResult getCodeList(ExitPermit bean) {
try {
return AjaxResult.success(backApplyInfoService.getCodeList(bean));
} catch (Exception e) {
return AjaxResult.success();
}
}
/**
* 新增出门证
*/

View File

@ -37,6 +37,9 @@ public class ExitPermit implements Serializable {
@ApiModelProperty(value = "日期")
private String addDate;
@ApiModelProperty(value = "领料单号")
private String code;
/**
* 创建人
@ -67,4 +70,9 @@ public class ExitPermit implements Serializable {
private String endTime;
/**
* 单号来源
*/
private String source;
}

View File

@ -517,4 +517,11 @@ public interface BackApplyInfoMapper {
BackApplyDetails selectCheckREDetails(BackApplyDetails details);
BackApplyDetails selectIsFinishByMaId(Long maId);
/**
* 出门证领料单号下拉
* @param bean
* @return
*/
List<ExitPermit> getCodeList(ExitPermit bean);
}

View File

@ -251,5 +251,12 @@ public interface IBackApplyInfoService {
int syncProjectDetails(BackApplyInfo backApplyInfo);
AjaxResult selectBackApplyInfoByIdClz(Long id, String keyWord);
/**
* 出门证领料单号下拉
* @param bean
* @return
*/
List<ExitPermit> getCodeList(ExitPermit bean);
}

View File

@ -404,6 +404,16 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
return ajaxResult;
}
/**
* 出门证领料单号下拉
* @param bean
* @return
*/
@Override
public List<ExitPermit> getCodeList(ExitPermit bean) {
return backApplyInfoMapper.getCodeList(bean);
}
/**
* 检查是否有编码设备
*/

View File

@ -60,6 +60,7 @@ public class BmReportController extends BaseController {
reportInfo.setPurchasePrice(info.getPurchasePrice());
reportInfo.setPurchasePriceNoTax(info.getPurchasePriceNoTax());
reportInfo.setPendingInputNum(info.getPendingInputNum());
reportInfo.setNotPassNum(info.getNotPassNum());
}
return AjaxResult.success(reportInfo);
}

View File

@ -46,6 +46,10 @@ public class PurChaseReportInfo {
@Excel(name = "验收合格数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
private BigDecimal passNum;
@ApiModelProperty(value = "未验收数量")
@Excel(name = "未验收数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
private BigDecimal notPassNum;
@ApiModelProperty(value = "入库数量")
@Excel(name = "入库数量", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
private BigDecimal inputNum;
@ -102,4 +106,7 @@ public class PurChaseReportInfo {
private String keyWord;
private Long userId;
@ApiModelProperty(value = "状态已验收1未入库2")
private String status;
}

View File

@ -45,6 +45,7 @@ public class BmReportServiceImpl implements BmReportService {
BigDecimal totalPurchasePrice = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP);
BigDecimal totalPurchasePriceNoTax = BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP);
BigDecimal totalPendingInputNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
BigDecimal totalNotPassNum = BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP);
List<PurChaseReportInfo> list = bmReportMapper.getPurChaseReportList(bean);
if (CollectionUtils.isNotEmpty(list)) {
for (PurChaseReportInfo purChaseReportInfo : list) {
@ -54,6 +55,7 @@ public class BmReportServiceImpl implements BmReportService {
totalPurchasePrice = totalPurchasePrice.add(purChaseReportInfo.getPurchasePrice());
totalPurchasePriceNoTax = totalPurchasePriceNoTax.add(purChaseReportInfo.getPurchasePriceNoTax());
totalPendingInputNum = totalPendingInputNum.add(purChaseReportInfo.getPendingInputNum());
totalNotPassNum = totalNotPassNum.add(purChaseReportInfo.getNotPassNum());
}
}
if (bean.getIsExport() == 0) {
@ -64,6 +66,7 @@ public class BmReportServiceImpl implements BmReportService {
info.setPurchasePrice(totalPurchasePrice);
info.setPurchasePriceNoTax(totalPurchasePriceNoTax);
info.setPendingInputNum(totalPendingInputNum);
info.setNotPassNum(totalNotPassNum);
info.setUnitName("合计");
list.add(0, info);
}

View File

@ -72,7 +72,7 @@ public class RepairCost extends BaseEntity {
@ApiModelProperty(value = "委外维修费用")
private BigDecimal outSourceCosts;
/** 维修方式1内部2返厂3报废 */
/** 维修方式1内部2返厂3报废4现场维修 */
@Excel(name = "维修方式", readConverterExp = "1=内部2返厂3报废")
private String repairType;

View File

@ -800,8 +800,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<insert id="addExitPermit">
insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time)
values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now())
insert into bm_exit_permit (material,name,car_code,add_date,create_by,create_time,code)
values (#{material}, #{name}, #{carCode}, #{addDate}, #{createBy}, now(), #{code})
</insert>
<insert id="syncProject" useGeneratedKeys="true" keyProperty="id">
INSERT INTO archives_record_info
@ -1507,7 +1507,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
`name`,
material,
car_code as carCode,
add_date as addDate
add_date as addDate,
code as code
FROM
bm_exit_permit
WHERE
@ -1629,4 +1630,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
limit 1
</select>
<select id="getCodeList" resultType="com.bonus.material.back.domain.ExitPermit">
SELECT
tt.`code` AS code,
tt.create_time AS createTime,
1 AS source
FROM
tm_task tt
LEFT JOIN lease_apply_info lp ON tt.task_id = lp.task_id
WHERE
task_type = 2
AND lp.direct_id IS NULL
UNION ALL
SELECT
`code` AS code,
create_time AS createTime,
2 AS source
FROM
lease_publish_details
GROUP BY
code
ORDER BY
createTime DESC;
</select>
</mapper>

View File

@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt1.unit_name as unitName,
IFNULL(pcd.purchase_num, 0) as purchaseNum,
IFNULL(pcd.check_num, 0) as passNum,
IFNULL(pcd.purchase_num, 0) - IFNULL(pcd.check_num, 0) as notPassNum,
IFNULL(pcd.input_num, 0) as inputNum,
IFNULL(pcd.purchase_price, 0) as purchasePrice,
IFNULL(pcd.purchase_tax_price, 0) as purchasePriceNoTax,
@ -42,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id
WHERE
pcd.check_num > 0 and tt.task_type = 0
tt.task_type = 0
<if test="userId != null ">
and mtm.user_id = #{userId}
</if>
@ -58,7 +59,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( pci.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
ORDER BY pcd.input_time DESC
<if test="status != null">
<choose>
<when test="status == 1">
and IFNULL(pcd.check_num, 0) > 0
</when>
<when test="status == 2">
and (
IFNULL(pcd.input_num, 0) = 0
or IFNULL(pcd.check_num, 0) > IFNULL(pcd.input_num, 0)
)
</when>
<otherwise>
and 1 = 1
</otherwise>
</choose>
</if>
ORDER BY pcd.input_time
</select>
<select id="getPurChaseReportDetailsList"

View File

@ -1268,9 +1268,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sai.is_slt = '0'
AND sai.`status` = '0'
AND bu.unit_name = #{teamName}
<if test="externalId != null and externalId != ''">
AND bu.project_id = #{externalId}
</if>
</select>
<select id="getClzAgreementId" resultType="com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo">
@ -1284,9 +1281,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
sai.is_slt = '0'
AND bu.unit_name = #{teamName}
<if test="externalId != null and externalId != ''">
AND bu.project_id = #{externalId}
</if>
</select>
<select id="selectProAuthorizeInfo" resultType="com.bonus.material.materialStation.domain.ProAuthorizeInfo">
SELECT