BUG修改
This commit is contained in:
parent
e509b09866
commit
4a55a3858e
|
|
@ -153,16 +153,30 @@ public class PartApplyAppVo extends PageInfo {
|
|||
private String startDay;
|
||||
|
||||
private String endDay;
|
||||
|
||||
/**
|
||||
* 领用路径
|
||||
*/
|
||||
private String lyUrl;
|
||||
|
||||
/**
|
||||
* 制单路径
|
||||
*/
|
||||
private String zdUrl;
|
||||
|
||||
/**
|
||||
* 出库路径
|
||||
*/
|
||||
private String ckUrl;
|
||||
|
||||
private String shUrl;
|
||||
|
||||
private String infoMsg;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 审核流程名称
|
||||
*/
|
||||
private String statusName;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import com.bonus.gzgqj.business.app.entity.MachinesVo;
|
|||
import com.bonus.gzgqj.business.app.entity.PartApplyAppVo;
|
||||
import com.bonus.gzgqj.business.app.entity.PartApplyDetailAppVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PaTypeVo;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -77,4 +77,11 @@ public interface PartApplyAppMapper {
|
|||
* @return
|
||||
*/
|
||||
List<PartApplyDetailAppVo> getDetailsList(PartApplyAppVo dto);
|
||||
|
||||
/**
|
||||
* 查询设备星系
|
||||
* @param deviceId
|
||||
* @return
|
||||
*/
|
||||
MachinesVo getDevInfoById(String deviceId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,15 +95,20 @@ public class PartApplyAppServiceImp {
|
|||
String userName=UserUtil.getLoginUser().getUsername();
|
||||
if(StringHelper.isEmpty(dto.getCreator())){
|
||||
dto.setCreator(userId.toString());
|
||||
dto.setUpdater(userId.toString());
|
||||
}
|
||||
if(StringHelper.isEmpty(dto.getUserName())){
|
||||
dto.setUserName(userName);
|
||||
}
|
||||
String detail=dto.getDetails();
|
||||
if(StringHelper.isEmpty(detail)){
|
||||
List<PartApplyDetailAppVo> list=dto.getDetailsList();
|
||||
if(list==null || list.size()<1){
|
||||
return ServerResponse.createErroe("请上传配件明细");
|
||||
}
|
||||
List<PartApplyDetailAppVo> list=JSON.parseArray(detail,PartApplyDetailAppVo.class);
|
||||
if(StringHelper.isNotEmpty(dto.getDeviceId())){
|
||||
MachinesVo voo=mapper.getDevInfoById(dto.getDeviceId());
|
||||
dto.setDevType(voo.getType());
|
||||
}
|
||||
|
||||
String code=getCode();
|
||||
dto.setCode(code);
|
||||
final int[] applyNum = {0};
|
||||
|
|
@ -125,7 +130,7 @@ public class PartApplyAppServiceImp {
|
|||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess(new ArrayList<MachinesVo>());
|
||||
return ServerResponse.createErroe("配件申请失败");
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +207,9 @@ public class PartApplyAppServiceImp {
|
|||
*/
|
||||
public ServerResponse getPartApplyDetails(PartApplyAppVo dto) {
|
||||
try{
|
||||
if(StringHelper.isEmpty(dto.getId())){
|
||||
return ServerResponse.createErroe("清先选择记录");
|
||||
}
|
||||
PartApplyAppVo vo=mapper.getPartApplyDetails(dto);
|
||||
List<FileUploadVo> flieList=uploadService.getFileList(dto.getId(),"t_part_apply","使用照片");
|
||||
vo.setFileList(flieList);
|
||||
|
|
|
|||
|
|
@ -101,5 +101,7 @@ public class PaTypeVo {
|
|||
/**报废量*/
|
||||
private int scrapNum;
|
||||
|
||||
private String keyWord;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public class PartCheckServiceImpl implements PartCheckService{
|
|||
paTypeVo.setNum(detail.getCheckNum());
|
||||
paTypeService.updateNum(paTypeVo);
|
||||
});
|
||||
return ServerResponse.createErroe("盘点成功");
|
||||
return ServerResponse.createSuccess("盘点成功","盘点成功");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public class PartScrapServiceImpl implements PartScrapService{
|
|||
paTypeVo.setBfNum(paTypeVo.getBfNum()+detail.getScrapNum());
|
||||
paTypeService.updateBfNum(paTypeVo);
|
||||
});
|
||||
return ServerResponse.createErroe("报废成功");
|
||||
return ServerResponse.createSuccess("报废成功","报废成功");
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
INSERT INTO t_part_apply(
|
||||
code, creator, user_name, create_time, type, remark, status, updater,
|
||||
update_time, dev_id,dev_code, dev_type, pro_id, pro_name,
|
||||
apply_num,audit_type)values(
|
||||
#{code},#{creater},#{userName},now(), #{type},#{remark},#{status},#{updater}, now(),#{deviceId},#{devCode}, #{devType},#{proId},#{proName}
|
||||
apply_num,status_type)values(
|
||||
#{code},#{creator},#{userName},now(), #{type},#{remark},#{status},#{updater}, now(),#{deviceId},#{devCode}, #{devType},#{proId},#{proName}
|
||||
,#{applyNum},#{statusType})
|
||||
</insert>
|
||||
<!--差人申请详情-->
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
</insert>
|
||||
|
||||
<select id="getDevList" resultType="com.bonus.gzgqj.business.app.entity.MachinesVo">
|
||||
select mm.id ,mt2.NAME name ,mt3.`NAME` type ,mt.name model ,mm.DEVICE_CODE deviceCode
|
||||
select mm.id ,mt2.NAME name ,mt3.`NAME` type ,mt.name module ,mm.DEVICE_CODE deviceCode
|
||||
from mm_machines mm
|
||||
left join mm_type mt on mt.id=mm.TYPE and mt.`LEVEL`=4 and mt.IS_ACTIVE=1
|
||||
left join mm_type mt2 on mt.PARENT_ID=mt2.id
|
||||
|
|
@ -37,6 +37,16 @@
|
|||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getDevInfoById" resultType="com.bonus.gzgqj.business.app.entity.MachinesVo">
|
||||
select mm.id ,mt2.NAME name ,mt3.`NAME` type ,mt.name module ,mm.DEVICE_CODE deviceCode
|
||||
from mm_machines mm
|
||||
left join mm_type mt on mt.id=mm.TYPE and mt.`LEVEL`=4 and mt.IS_ACTIVE=1
|
||||
left join mm_type mt2 on mt.PARENT_ID=mt2.id
|
||||
left join mm_type mt3 on mt2.PARENT_ID=mt3.id
|
||||
where mm.BATCH_STATUS=7 and mm.id=#{devId}
|
||||
</select>
|
||||
<select id="getWfRecordList" resultType="com.bonus.gzgqj.business.app.entity.MachinesVo">
|
||||
select wir.sup_id ,wat.AGREEMENT_ID,
|
||||
wir.id ,pro.`NAME` proName ,pro.Id proId
|
||||
|
|
@ -76,12 +86,24 @@
|
|||
<!--配件申请查询记录-->
|
||||
<select id="getPartApplyList" resultType="com.bonus.gzgqj.business.app.entity.PartApplyAppVo">
|
||||
select tpa.id,tpa.code,tpa.creator,tpa.user_name userName,
|
||||
tpa.create_time createTime,tpa.type ,
|
||||
tpa.remark,tpa.status ,tpa.updater,
|
||||
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
||||
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
||||
tpa.status_type statusType,tpa.apply_num applyNum,
|
||||
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime
|
||||
tpa.create_time createTime,tpa.type ,
|
||||
tpa.remark,tpa.status ,tpa.updater,
|
||||
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
||||
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
||||
tpa.status_type statusType,tpa.apply_num applyNum,
|
||||
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime,
|
||||
CASE tpa.status
|
||||
when 1 THEN '待审核'
|
||||
when 2 THEN '待出库'
|
||||
when 3 THEN '已驳回'
|
||||
when 4 THEN '已出库'
|
||||
else '待审核'
|
||||
END as statusName,
|
||||
CASE tpa.type
|
||||
when 0 then '设备'
|
||||
when 1 then '工器具'
|
||||
else '工器具'
|
||||
END as typeName
|
||||
FROM t_part_apply tpa
|
||||
<where>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
|
|
@ -103,13 +125,21 @@
|
|||
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
||||
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
||||
tpa.status_type statusType,tpa.apply_num applyNum,
|
||||
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime
|
||||
tpa.zd_user ,fz_user ,ck_user ,zd_time zdTime,fz_time fzTime,ck_time ckTime,
|
||||
CASE tpa.status when 1 THEN '待审核' when 2 THEN '待出库'
|
||||
when 3 THEN '已驳回' when 4 THEN '已出库' else '待审核' END as statusName,
|
||||
CASE tpa.type when 0 then '设备' when 1 then '工器具' else '工器具' END as typeName,
|
||||
pu2.LOGIN_NAME zdUser,pu3.LOGIN_NAME ckUser,pu4.LOGIN_NAME fzUser
|
||||
FROM t_part_apply tpa
|
||||
left join pm_user pu on tpa.creator=pu.id -- 领用人
|
||||
left join pm_user pu2 on tpa.zd_user=pu2.id -- 制单人
|
||||
left join pm_user pu3 on tpa.ck_user=pu3.id -- 出库人
|
||||
left join pm_user pu4 on tpa.fz_user=pu4.id -- 审核人
|
||||
where tpa.id=#{id}
|
||||
</select>
|
||||
<select id="getDetailsList" resultType="com.bonus.gzgqj.business.app.entity.PartApplyDetailAppVo">
|
||||
select ppd.id,ppd.apply_id applyId, ppd.part_id partId, ppd.apply_num applyNum,
|
||||
ppd.part_type partType, ppd.part_name partName, ppd.part_model partModel,
|
||||
ppd.part_type partType, ppd.part_name partName, ppd.part_model partModel,ppd.part_unit partUnit,
|
||||
pt.price ,(ppd.apply_num*pt.price ) money
|
||||
from t_part_apply_details ppd
|
||||
LEFT JOIN pa_type pt on pt.id=ppd.part_id
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
<!--分页查询 节点数据-->
|
||||
<select id="findByPageList" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
|
||||
select pt.id, pt.parent_id parentId,pt.name model ,
|
||||
0 price ,pt.unit ,pt.weight,pt.is_consumables ,
|
||||
0 price ,pt.unit ,pt.weight,pt.is_consumables ,pt.num,pt.price,
|
||||
pt.remarks,pt.is_active ,pt.level,pt.warn_num,pt1.`name` name ,pt2.name type
|
||||
FROM pa_type pt
|
||||
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
||||
|
|
|
|||
|
|
@ -80,22 +80,22 @@
|
|||
</select>
|
||||
|
||||
<select id="getInfo" resultType="java.lang.String">
|
||||
select CONCAT(part_name,":",SUM(check_num)) detail
|
||||
select ANY_VALUE(CONCAT(part_name,":",SUM(check_num))) detail
|
||||
from t_part_inventory_details
|
||||
where put_id=#{id}
|
||||
where inv_id=#{id}
|
||||
GROUP BY part_name
|
||||
|
||||
</select>
|
||||
<select id="getAddMsg" resultType="java.lang.String">
|
||||
select CONCAT(part_name,":",num,"=>",check_num) detail
|
||||
select ANY_VALUE( CONCAT(part_name,":",num,"=>",SUM(check_num))) detail
|
||||
from t_part_inventory_details
|
||||
where put_id=#{id} and add_num>=0
|
||||
where inv_id=#{id} and add_num>=0
|
||||
GROUP BY part_name
|
||||
</select>
|
||||
<select id="getSubMsg" resultType="java.lang.String">
|
||||
select CONCAT(part_name,":",num,"=>",check_num) detail
|
||||
select ANY_VALUE( CONCAT(part_name,":",num,"=>",SUM(check_num))) detail
|
||||
from t_part_inventory_details
|
||||
where put_id=#{id} and sub_num>0
|
||||
where inv_id=#{id} and sub_num>0
|
||||
GROUP BY part_name
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue