Merge remote-tracking branch 'origin/master'

This commit is contained in:
hongchao 2025-06-16 10:51:01 +08:00
commit 84a78feb16
14 changed files with 218 additions and 41 deletions

View File

@ -14,7 +14,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @author bonus
*/
@EnableCustomConfig
@EnableCustomSwagger2
//@EnableCustomSwagger2
@EnableRyFeignClients
@SpringBootApplication(scanBasePackages = {"com.bonus.common.biz.*", "com.bonus.material.*"}, exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling

View File

@ -4,6 +4,7 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.bonus.common.log.enums.OperaType;
import com.bonus.material.common.annotation.PreventRepeatSubmit;
import com.bonus.material.ma.domain.vo.MaTypeVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
@ -141,4 +142,43 @@ public class TypeRepairController extends BaseController
{
return toAjax(typeRepairService.deleteTypeRepairByUserIdAndTypeId(typeRepairs));
}
/**
* 新增人员配置
*/
@ApiOperation(value = "新增人员配置")
@PreventRepeatSubmit
@RequiresPermissions("ma:manage:add")
@SysLog(title = "新增人员配置", businessType = OperaType.INSERT, module = "仓储管理->新增人员配置")
@PostMapping("/addTypeManage")
public AjaxResult addTypeManage(@RequestBody List<TypeRepair> typeRepairs)
{
return toAjax(typeRepairService.addTypeManage(typeRepairs));
}
/**
* 查询人员配置列表
*/
@ApiOperation(value = "查询人员配置列表")
@RequiresPermissions("ma:manage:list")
@GetMapping("/getTypeManageList")
public TableDataInfo getTypeManageList(MaTypeVo maTypeVo)
{
startPage();
List<MaTypeVo> list = typeRepairService.getTypeManageList(maTypeVo);
return getDataTable(list);
}
/**
* 删除维修班机具配置
*/
@ApiOperation(value = "删除单个维修班机具配置")
@PreventRepeatSubmit
@RequiresPermissions("ma:manage:remove")
@SysLog(title = "维修班机具配置", businessType = OperaType.DELETE, module = "仓储管理->删除单个维修班机具配置")
@PostMapping("/unbindTypeManage")
public AjaxResult unbindTypeManage(@RequestBody List<TypeRepair> typeRepairs)
{
return toAjax(typeRepairService.deleteTypeManageByUserIdAndTypeId(typeRepairs));
}
}

View File

@ -25,6 +25,11 @@ public class TypeRepair extends BaseEntity {
/** 类型ID */
private Long typeId;
/**
* 类型名称
*/
private String typeName;
/** 用户 */
@Excel(name = "用户")
@ApiModelProperty(value = "用户")

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.ma.domain.TypeRepair;
import com.bonus.material.ma.domain.vo.MaTypeVo;
import org.apache.ibatis.annotations.Param;
/**
@ -79,4 +80,19 @@ public interface TypeRepairMapper {
* @return
*/
List<TypeRepair> getRepairList(TypeRepair typeRepair);
/**
*删除人员配置
*/
int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs);
/**
* 新增人员配置
*/
int insertTypeManage(List<TypeRepair> typeRepairs);
/**
* 查询人员配置列表
*/
List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo);
}

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.ma.domain.TypeRepair;
import com.bonus.material.ma.domain.vo.MaTypeVo;
/**
* 维修班机具配置Service接口
@ -76,4 +77,21 @@ public interface ITypeRepairService {
* @return
*/
AjaxResult getRepairList(TypeRepair typeRepair);
/**
* 新增人员配置
*/
int addTypeManage(List<TypeRepair> typeRepairs);
/**
* 查询人员配置列表
*/
List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo);
/**
* 删除维修班机具配置
* @param typeRepairs
* @return
*/
int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs);
}

View File

@ -3,6 +3,7 @@ package com.bonus.material.ma.service.impl;
import java.util.List;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.ma.domain.vo.MaTypeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bonus.material.ma.mapper.TypeRepairMapper;
@ -129,4 +130,39 @@ public class TypeRepairServiceImpl implements ITypeRepairService {
public AjaxResult getRepairList(TypeRepair typeRepair) {
return AjaxResult.success(typeRepairMapper.getRepairList(typeRepair));
}
/**
* 新增人员配置
*/
@Override
public int addTypeManage(List<TypeRepair> typeRepairs) {
if (CollectionUtils.isEmpty(typeRepairs)) {
return 0;
}
typeRepairs.forEach(typeRepair -> typeRepair.setCreateTime(DateUtils.getNowDate()));
typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs);
return typeRepairMapper.insertTypeManage(typeRepairs);
}
/**
* 查询人员配置列表
*/
@Override
public List<MaTypeVo> getTypeManageList(MaTypeVo maTypeVo) {
return typeRepairMapper.getTypeManageList(maTypeVo);
}
/**
* 删除维修班机具配置
* @param typeRepairs
* @return
*/
@Override
public int deleteTypeManageByUserIdAndTypeId(List<TypeRepair> typeRepairs) {
return typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs);
}
}

View File

@ -234,11 +234,13 @@ public class PartArrivedServiceImpl implements IPartArrivedService
}
if(!CollectionUtils.isEmpty(partTypeCheckDetails)) {
BigDecimal purchaseNum = new BigDecimal(0);
BigDecimal inputNum = new BigDecimal(0);
BigDecimal purchasePrice = new BigDecimal(0);
BigDecimal purchaseTaxPrice = new BigDecimal(0);
String partName = "";
for (int j = 0; j < partTypeCheckDetails.size(); j++) {
purchaseNum = purchaseNum.add(partTypeCheckDetails.get(j).getPurchaseNum());
inputNum = inputNum.add(partTypeCheckDetails.get(j).getInputNum());
purchasePrice = purchasePrice.add(partTypeCheckDetails.get(j).getPurchasePrice().multiply(partTypeCheckDetails.get(j).getPurchaseNum()));
purchaseTaxPrice = purchaseTaxPrice.add(partTypeCheckDetails.get(j).getPurchaseTaxPrice().multiply(partTypeCheckDetails.get(j).getPurchaseNum()));
partName = partName + partTypeCheckDetails.get(j).getMaTypeName();
@ -246,6 +248,7 @@ public class PartArrivedServiceImpl implements IPartArrivedService
partName += ",";
}
}
partTypeCheckInfos.get(i).setInputMaNumber(inputNum);
partTypeCheckInfos.get(i).setPurchaseMaNumber(purchaseNum);
partTypeCheckInfos.get(i).setPurchasePrice(purchasePrice);
partTypeCheckInfos.get(i).setPurchaseTaxPrice(purchaseTaxPrice);
@ -387,8 +390,8 @@ public class PartArrivedServiceImpl implements IPartArrivedService
if (!CollectionUtils.isEmpty(partTypeCheckDto.getPartTypeCheckDetailsList())) {
partTypeCheckDto.getPartTypeCheckDetailsList().removeIf(Objects::isNull);
partTypeCheckDto.getPartTypeCheckDetailsList().removeIf(o -> Objects.isNull(o.getStatus()));
partTypeCheckDto.getPartTypeCheckDetailsList().removeIf(o ->
!Objects.equals(o.getStatus(), 0));
// partTypeCheckDto.getPartTypeCheckDetailsList().removeIf(o ->
// !Objects.equals(o.getStatus(), 0));
}
try {
Long[] ids = new Long[partTypeCheckDto.getPartTypeCheckDetailsList().size()];

View File

@ -228,8 +228,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and mt.type_name like concat('%',#{typeModelName},'%')
</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
AND (lod.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
or bcd.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))
AND (lai.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
or baif.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))
</if>
<if test="statusName != null and statusName != ''">
AND (

View File

@ -128,7 +128,7 @@
and bui.unit_id = #{unitId}
</if>
<if test="status != null and status != ''">
and dai.status = #{status}
and swr.workflow_status = #{status}
</if>
<if test="isApp != null and taskStatus==0">and dai.status = 0 </if>
<if test="isApp != null and taskStatus==1">and (dai.status = 1 or dai.status = 2)</if>

View File

@ -43,6 +43,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)
</foreach>
</insert>
<insert id="insertTypeManage">
insert into ma_type_manage (type_id,user_id,create_time,update_time,company_id)
values
<foreach collection="list" item="item" separator=",">
(
#{item.typeId},
#{item.userId},
#{item.createTime},
#{item.updateTime},
#{item.companyId}
)
</foreach>
</insert>
<update id="updateTypeRepair" parameterType="com.bonus.material.ma.domain.TypeRepair">
update ma_type_repair
@ -93,6 +106,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mtk.user_id,
su.nick_name
</select>
<select id="getTypeManageList" resultType="com.bonus.material.ma.domain.vo.MaTypeVo">
SELECT DISTINCT
mt.type_id as typeId,
mt.type_name as typeName,
mtm.user_id as keeperUserId,
su.nick_name as keeperUserName
FROM
ma_type mt
LEFT JOIN wh_house_set mhs on mt.type_id = mhs.type_id
LEFT JOIN ma_type_manage mtm on mt.type_id = mtm.type_id
LEFT JOIN sys_user su on su.user_id = mtm.user_id
<where>
<if test="level == 1">
and mt.type_id = #{typeId}
</if>
and mt.type_id is not null
and mhs.house_id = #{houseId} and mhs.del_flag = 0
</where>
</select>
<delete id="deleteTypeRepairByUserIdAndTypeId">
delete from ma_type_repair where
@ -106,4 +139,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.userId}
</foreach>
</delete>
<delete id="deleteTypeManageByUserIdAndTypeId">
delete from ma_type_manage where
type_id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item.typeId}
</foreach>
and
user_id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item.userId}
</foreach>
</delete>
</mapper>

View File

@ -123,16 +123,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
<![CDATA[and DATE_FORMAT( ppi.arrival_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} ]]>
</if>
and t.task_status!=12
</where>
order by ppi.create_time desc
</select>
<select id="selectPartTypeCheckDetailsList" resultType="com.bonus.material.part.domain.PartTypeCheckDetails">
select part_id as partId,mpt.pa_name as maTypeName,purchase_price as purchasePrice,purchase_tax_price as purchaseTaxPrice,
purchase_num as purchaseNum,ppd.status as status
select part_id as partId,
mpt.pa_name as maTypeName,
purchase_price as purchasePrice,
purchase_tax_price as purchaseTaxPrice,
purchase_num as purchaseNum,
ppd.status as status,
IFNULL(ppd.input_num, 0) as inputNum
from purchase_part_details ppd
left join ma_part_type mpt on ppd.part_id = mpt.pa_id and mpt.del_flag = 0
where ppd.task_id = #{taskId} and ppd.del_flag = 0
where ppd.task_id = #{taskId}
and ppd.del_flag = 0
</select>
<select id="selectPartTypeCheckDetailsListByQueryDto" resultType="com.bonus.material.part.domain.PartTypeCheckDetails">
@ -153,6 +160,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productionTime != null">
and date_format(ppd.production_time,'%y%m%d') = date_format(#{productionTime},'%y%m%d')
</if>
<if test="keyWord != null and keyWord!=''">
and (
mpt.pa_name like concat('%', #{keyWord}, '%') or
mpt3.pa_name like concat('%', #{keyWord}, '%') or
mpt2.pa_name like concat('%', #{keyWord}, '%')
)
</if>
</select>
<select id="selectPartTypeCheckInfoById" resultType="com.bonus.material.part.domain.PartTypeCheckInfo">
select

View File

@ -49,7 +49,7 @@
)
</if>
<if test="status != null and status!=''">
AND sra.status = #{status}
AND swr.workflow_status = #{status}
</if>
<if test="taskStatus !=null">
AND sra.status = #{taskStatus}

View File

@ -55,7 +55,7 @@
</if>
<if test="status != null and status != ''">
and dai.status = #{status}
and swr.workflow_status = #{status}
</if>
<if test="isApp != null and taskStatus==0">and dai.status = 0 </if>
<if test="isApp != null and taskStatus==1">and (dai.status = 1 or dai.status = 2)</if>

View File

@ -63,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_workflow_node swn
left join sys_workflow_config sec on swn.id= sec.node_id
where swn.type_id=#{typeId}
<if test="nodeName != null "> and type_name like concat('%', #{typeName}, '%')</if>
<if test="nodeSignType != null "> and node_sign_type = #{nodeSignType}</if>
<if test="nodeName != null "> and swn.node_name like concat('%', #{nodeName}, '%')</if>
<if test="nodeSignType != null "> and swn.node_sign_type = #{nodeSignType}</if>
GROUP BY swn.id ORDER BY swn.node_sort
</select>
<select id="listByTaskId" resultType="com.bonus.material.work.domain.SysWorkflowNode">