Merge remote-tracking branch 'origin/test' into dev
This commit is contained in:
commit
1ef299d409
|
|
@ -102,6 +102,29 @@ public class BackReceiveController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-rfid退料
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return AjaxResult对象
|
||||||
|
*/
|
||||||
|
@Log(title = "退料接收-rfid退料", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("setRfidCodeBack")
|
||||||
|
public AjaxResult setRfidCodeBack(@RequestBody BackApplyInfo record) {
|
||||||
|
try {
|
||||||
|
int res =backReceiveService.setRfidCodeBack(record);
|
||||||
|
if (res>0){
|
||||||
|
return AjaxResult.success("接收成功");
|
||||||
|
}else if (res==-1){
|
||||||
|
return AjaxResult.error("该RFID编码已接收");
|
||||||
|
}else {
|
||||||
|
return AjaxResult.error("接收失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Log(title = "退料接收-结束任务", businessType = BusinessType.INSERT)
|
@Log(title = "退料接收-结束任务", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("endBack")
|
@PostMapping("endBack")
|
||||||
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
|
public AjaxResult endBack(@RequestBody BackApplyInfo record) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
package com.bonus.sgzb.app.controller;
|
package com.bonus.sgzb.app.controller;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
import com.bonus.sgzb.app.service.LeaseOutDetailsService;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
|
|
@ -10,6 +13,7 @@ import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description: 任务领料出库详情表控制器
|
* Description: 任务领料出库详情表控制器
|
||||||
|
|
@ -75,4 +79,20 @@ public class LeaseOutDetailsController extends BaseController {
|
||||||
return leaseOutDetailsService.submitOut(record);
|
return leaseOutDetailsService.submitOut(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
*/
|
||||||
|
@Log(title = "综合查询--领用记录查询", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/leaseOutRecord")
|
||||||
|
public AjaxResult leaseOutRecord(@RequestBody LeaseApplyDetails bean){
|
||||||
|
try {
|
||||||
|
List<LeaseApplyDetails> list = leaseOutDetailsService.leaseOutRecord(bean);
|
||||||
|
return success(list);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料
|
* 退料
|
||||||
|
* @author bns_han
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class BackApplyInfo {
|
public class BackApplyInfo {
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,11 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
@ApiModelProperty(value = "计量单位")
|
@ApiModelProperty(value = "计量单位")
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工程名称
|
||||||
|
*/
|
||||||
|
private String proName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备所属类型
|
* 设备所属类型
|
||||||
*/
|
*/
|
||||||
|
|
@ -154,4 +159,11 @@ public class LeaseApplyDetails implements Serializable {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "当前库管员领料出库的单子")
|
@ApiModelProperty(value = "当前库管员领料出库的单子")
|
||||||
private Integer count;
|
private Integer count;
|
||||||
|
|
||||||
|
@ApiModelProperty(value="开始时间")
|
||||||
|
private String startTime;
|
||||||
|
@ApiModelProperty(value="结束时间")
|
||||||
|
private String endTime;
|
||||||
|
@ApiModelProperty(value="关键字")
|
||||||
|
private String keyWord;
|
||||||
}
|
}
|
||||||
|
|
@ -8,54 +8,164 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bns_han
|
||||||
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface BackReceiveMapper {
|
public interface BackReceiveMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收列表
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> getbackReceiveList(BackApplyInfo record);
|
List<BackApplyInfo> getbackReceiveList(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收明细
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> receiveView(BackApplyInfo record);
|
List<BackApplyInfo> receiveView(BackApplyInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加退料合格数量
|
* 添加接收数据back_check_details
|
||||||
|
* @param record
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
int setCheckDetails(BackApplyInfo record);
|
|
||||||
|
|
||||||
int insertCheckDetails(BackApplyInfo record);
|
int insertCheckDetails(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询编号
|
||||||
|
* @param date
|
||||||
|
* @param taskType
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectTaskNumByMonthWx(@Param("date") Date date, @Param("taskType") Integer taskType);
|
int selectTaskNumByMonthWx(@Param("date") Date date, @Param("taskType") Integer taskType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加维修任务
|
||||||
|
* @param bean
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int addWxTask(BackApplyInfo bean);
|
int addWxTask(BackApplyInfo bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加维修协议
|
||||||
|
* @param bean
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int addWxTaskAgreement(BackApplyInfo bean);
|
int addWxTaskAgreement(BackApplyInfo bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新任务状态
|
||||||
|
* @param taskId
|
||||||
|
* @param status
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int updateTaskStatus(@Param("taskId") int taskId, @Param("status") int status);
|
int updateTaskStatus(@Param("taskId") int taskId, @Param("status") int status);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新ma_machine
|
||||||
|
* @param maId
|
||||||
|
* @param maStatus
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int updateMaStatus(@Param("maId") int maId,@Param("maStatus") String maStatus);
|
int updateMaStatus(@Param("maId") int maId,@Param("maStatus") String maStatus);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* getHgList
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> getHgList(BackApplyInfo record);
|
List<BackApplyInfo> getHgList(BackApplyInfo record);
|
||||||
|
|
||||||
int insertIAD(BackApplyInfo bi);
|
/**
|
||||||
|
* 插入input_apply_details
|
||||||
|
* @param bi
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int insertIad(BackApplyInfo bi);
|
||||||
|
|
||||||
int updateMT(BackApplyInfo bi);
|
/**
|
||||||
|
* 修改ma_type库存
|
||||||
|
* @param bi
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int updateMt(BackApplyInfo bi);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> getWxList(BackApplyInfo record);
|
List<BackApplyInfo> getWxList(BackApplyInfo record);
|
||||||
|
|
||||||
int insertTT(BackApplyInfo bean);
|
/**
|
||||||
|
* tm_task
|
||||||
|
* @param bean
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int insertTt(BackApplyInfo bean);
|
||||||
|
|
||||||
int insertRAD(BackApplyInfo wx);
|
/**
|
||||||
|
* repair_apply_details
|
||||||
|
* @param wx
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int insertRad(BackApplyInfo wx);
|
||||||
|
|
||||||
int insertTTA(@Param("taskId") int taskId,@Param("agreementId") String agreementId);
|
/**
|
||||||
|
* tm_task_agreement
|
||||||
|
* @param taskId
|
||||||
|
* @param agreementId
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int insertTta(@Param("taskId") int taskId,@Param("agreementId") String agreementId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> getBfList(BackApplyInfo record);
|
List<BackApplyInfo> getBfList(BackApplyInfo record);
|
||||||
|
|
||||||
int insertSAD(BackApplyInfo bf);
|
/**
|
||||||
|
* 插入scrap_apply_details
|
||||||
|
* @param bf
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int insertSad(BackApplyInfo bf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> codeQuery(BackApplyInfo record);
|
List<BackApplyInfo> codeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码查询
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收记录
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
* @param maId
|
||||||
|
* @param taskId
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId,@Param("taskId") Integer taskId);
|
int selectCodeByMaIdAndTaskId(@Param("maId") Integer maId,@Param("taskId") Integer taskId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.sgzb.app.mapper;
|
package com.bonus.sgzb.app.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
@ -51,4 +53,11 @@ public interface LeaseOutDetailsMapper {
|
||||||
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
int updateTaskStatus(@Param("taskId") String taskId,@Param("status")int status);
|
||||||
|
|
||||||
String getMachineStatus(LeaseOutDetails record);
|
String getMachineStatus(LeaseOutDetails record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
* @return List<LeaseApplyDetails>
|
||||||
|
*/
|
||||||
|
List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,45 +6,110 @@ import com.bonus.sgzb.app.domain.TmTask;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bns_han
|
||||||
|
*/
|
||||||
public interface BackApplyService {
|
public interface BackApplyService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询退料单位列表
|
* 查询退料单位列表
|
||||||
|
* @param record
|
||||||
|
* @return List<BmAgreementInfo>
|
||||||
*/
|
*/
|
||||||
List<BmAgreementInfo> getbackUnit(BmAgreementInfo record);
|
List<BmAgreementInfo> getbackUnit(BmAgreementInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询退料工程列表
|
* 查询退料工程列表
|
||||||
|
* @param record
|
||||||
|
* @return List<BmAgreementInfo>
|
||||||
*/
|
*/
|
||||||
List<BmAgreementInfo> getbackPro(BmAgreementInfo record);
|
List<BmAgreementInfo> getbackPro(BmAgreementInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建任务单
|
* 创建任务单
|
||||||
|
* @param task
|
||||||
|
* @return int
|
||||||
*/
|
*/
|
||||||
int insertTask(TmTask task);
|
int insertTask(TmTask task);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退料申请列表
|
* 退料申请列表
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
*/
|
*/
|
||||||
List<BackApplyInfo> getbackList(BackApplyInfo record);
|
List<BackApplyInfo> getbackList(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务协议表(tm_task_agreement)
|
||||||
|
* @param task
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int insertTaskAgreement(TmTask task);
|
int insertTaskAgreement(TmTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料任务表(back_apply_info)
|
||||||
|
* @param task
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int insertBackApply(TmTask task);
|
int insertBackApply(TmTask task);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料列表
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> materialList(BackApplyInfo record);
|
List<BackApplyInfo> materialList(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交物料型号及数量
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int upload(BackApplyInfo record);
|
int upload(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情查看
|
||||||
|
* @param record
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> view(BackApplyInfo record);
|
List<BackApplyInfo> view(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param record
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int del(BackApplyInfo record);
|
int del(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料审核列表
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> examineList(BackApplyInfo record);
|
List<BackApplyInfo> examineList(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料审核明细
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> examineView(BackApplyInfo record);
|
List<BackApplyInfo> examineView(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料审核通过
|
||||||
|
* @param record
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int audit(BackApplyInfo record);
|
int audit(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料审核驳回
|
||||||
|
* @param record
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int refuse(BackApplyInfo record);
|
int refuse(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,74 @@ import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bns_han
|
||||||
|
*/
|
||||||
public interface BackReceiveService {
|
public interface BackReceiveService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收列表
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return AjaxResult对象
|
||||||
|
*/
|
||||||
List<BackApplyInfo> getbackReceiveList(BackApplyInfo record);
|
List<BackApplyInfo> getbackReceiveList(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收明细
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return AjaxResult对象
|
||||||
|
*/
|
||||||
List<BackApplyInfo> receiveView(BackApplyInfo record);
|
List<BackApplyInfo> receiveView(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量退料--管理方式为1的
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return AjaxResult对象
|
||||||
|
*/
|
||||||
int setNumBack(BackApplyInfo record);
|
int setNumBack(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码退料--管理方式为0的
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return AjaxResult对象
|
||||||
|
*/
|
||||||
int setCodeBack(BackApplyInfo record);
|
int setCodeBack(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-结束任务
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
int endBack(BackApplyInfo record);
|
int endBack(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-编号查询
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> codeQuery(BackApplyInfo record);
|
List<BackApplyInfo> codeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-二维码查询
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
List<BackApplyInfo> qrcodeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收记录
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return List<BackApplyInfo>
|
||||||
|
*/
|
||||||
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
List<BackApplyInfo> backReceiveRecord(BackApplyInfo record);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -28,4 +80,12 @@ public interface BackReceiveService {
|
||||||
* @return List<BackApplyInfo>
|
* @return List<BackApplyInfo>
|
||||||
*/
|
*/
|
||||||
List<BackApplyInfo> rfidCodeQuery(BackApplyInfo record);
|
List<BackApplyInfo> rfidCodeQuery(BackApplyInfo record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退料接收-rfid退料
|
||||||
|
*
|
||||||
|
* @param record 查询条件
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
int setRfidCodeBack(BackApplyInfo record);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.bonus.sgzb.app.service;
|
package com.bonus.sgzb.app.service;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||||
|
import com.bonus.sgzb.app.domain.TmTask;
|
||||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
|
|
@ -22,5 +24,13 @@ public interface LeaseOutDetailsService {
|
||||||
List<MaMachine> getMaMachineByCode(String maCode);
|
List<MaMachine> getMaMachineByCode(String maCode);
|
||||||
|
|
||||||
List<MaMachine> getMaMachineByQrCode(String qrCode);
|
List<MaMachine> getMaMachineByQrCode(String qrCode);
|
||||||
|
|
||||||
List<MaMachine> getMaMachineByRfidCode(String rfidCode);
|
List<MaMachine> getMaMachineByRfidCode(String rfidCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合查询--领用记录查询
|
||||||
|
* @param bean
|
||||||
|
* @return List<TmTask>
|
||||||
|
*/
|
||||||
|
List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -174,12 +174,47 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
return backReceiveMapper.rfidCodeQuery(record);
|
return backReceiveMapper.rfidCodeQuery(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int setRfidCodeBack(BackApplyInfo record) {
|
||||||
|
int res=0;
|
||||||
|
try{
|
||||||
|
BackApplyInfo[] arr = record.getArr();
|
||||||
|
if (arr.length>0){
|
||||||
|
for (int i=0;i< arr.length;i++){
|
||||||
|
//根据maId和taskId查询是否已接收
|
||||||
|
int re = backReceiveMapper.selectCodeByMaIdAndTaskId(arr[i].getMaId(),record.getTaskId());
|
||||||
|
if (re>0){
|
||||||
|
res=-1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (res==-1){
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int taskId = record.getTaskId();
|
||||||
|
//修改任务状态
|
||||||
|
res= updateTaskStatus(taskId,39);
|
||||||
|
if(res == 0) {
|
||||||
|
throw new RuntimeException("插入back_check_details异常");
|
||||||
|
}
|
||||||
|
//插入back_check_details
|
||||||
|
res = insertBcd(record);
|
||||||
|
if(res == 0) {
|
||||||
|
throw new RuntimeException("插入back_check_details异常");
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
throw new RuntimeException(e.getMessage());
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
private int insertRad(int taskId, List<BackApplyInfo> wxList) {
|
private int insertRad(int taskId, List<BackApplyInfo> wxList) {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if(wxList !=null){
|
if(wxList !=null){
|
||||||
for( BackApplyInfo wx : wxList ){
|
for( BackApplyInfo wx : wxList ){
|
||||||
wx.setTaskId(taskId);
|
wx.setTaskId(taskId);
|
||||||
result = backReceiveMapper.insertRAD(wx);
|
result = backReceiveMapper.insertRad(wx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -190,7 +225,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if(list !=null){
|
if(list !=null){
|
||||||
for( BackApplyInfo bf : list ){
|
for( BackApplyInfo bf : list ){
|
||||||
bf.setTaskId(taskId);
|
bf.setTaskId(taskId);
|
||||||
result = backReceiveMapper.insertSAD(bf);
|
result = backReceiveMapper.insertSad(bf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -199,7 +234,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
private int insertTta(int taskId, List<BackApplyInfo> list) {
|
private int insertTta(int taskId, List<BackApplyInfo> list) {
|
||||||
int res;
|
int res;
|
||||||
String agreementId = list.get(0).getAgreementId();
|
String agreementId = list.get(0).getAgreementId();
|
||||||
res = backReceiveMapper.insertTTA(taskId,agreementId);
|
res = backReceiveMapper.insertTta(taskId,agreementId);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -213,14 +248,14 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if(GlobalConstants.INT_41 == taskType){
|
if(GlobalConstants.INT_41 == taskType){
|
||||||
taskStatus = "43";
|
taskStatus = "43";
|
||||||
}
|
}
|
||||||
if(57 == taskType){
|
if(GlobalConstants.FIFTY_SEVEN == taskType){
|
||||||
taskStatus = "58";
|
taskStatus = "58";
|
||||||
}
|
}
|
||||||
applyInfo.setTaskStatus(taskStatus);
|
applyInfo.setTaskStatus(taskStatus);
|
||||||
applyInfo.setCode(code);
|
applyInfo.setCode(code);
|
||||||
//创建人
|
//创建人
|
||||||
applyInfo.setCreateBy(createBy);
|
applyInfo.setCreateBy(createBy);
|
||||||
newTask = backReceiveMapper.insertTT(applyInfo);
|
newTask = backReceiveMapper.insertTt(applyInfo);
|
||||||
if (newTask>0 && applyInfo.getTaskId()>0){
|
if (newTask>0 && applyInfo.getTaskId()>0){
|
||||||
newTask=applyInfo.getTaskId();
|
newTask=applyInfo.getTaskId();
|
||||||
}
|
}
|
||||||
|
|
@ -247,7 +282,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
int res =0;
|
int res =0;
|
||||||
if(hgList!=null && hgList.size()>0){
|
if(hgList!=null && hgList.size()>0){
|
||||||
for(BackApplyInfo bi : hgList){
|
for(BackApplyInfo bi : hgList){
|
||||||
res = backReceiveMapper.updateMT(bi);
|
res = backReceiveMapper.updateMt(bi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -257,7 +292,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
int res =0;
|
int res =0;
|
||||||
if(hgList!=null && hgList.size()>0){
|
if(hgList!=null && hgList.size()>0){
|
||||||
for(BackApplyInfo bi : hgList){
|
for(BackApplyInfo bi : hgList){
|
||||||
res = backReceiveMapper.insertIAD(bi);
|
res = backReceiveMapper.insertIad(bi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
@ -301,15 +336,15 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
String format = dateFormat.format(nowDate);
|
String format = dateFormat.format(nowDate);
|
||||||
int taskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate,taskType) + 1;
|
int taskNum = backReceiveMapper.selectTaskNumByMonthWx(nowDate,taskType) + 1;
|
||||||
String code="";
|
String code="";
|
||||||
if(41 == taskType){
|
if(GlobalConstants.FORTY_ONE == taskType){
|
||||||
code = "WX";
|
code = "WX";
|
||||||
}
|
}
|
||||||
if(57 == taskType){
|
if(GlobalConstants.FIFTY_SEVEN == taskType){
|
||||||
code = "BF";
|
code = "BF";
|
||||||
}
|
}
|
||||||
if (taskNum>9 && taskNum<100){
|
if (taskNum>GlobalConstants.NINE && taskNum<GlobalConstants.ONE_HUNDRED){
|
||||||
code = code + format + "-00" + taskNum;
|
code = code + format + "-00" + taskNum;
|
||||||
}else if (taskNum>99 && taskNum<1000){
|
}else if (taskNum>GlobalConstants.NINETY_NINE && taskNum<GlobalConstants.ONE_THOUSAND){
|
||||||
code = code +format + "-0" + taskNum;
|
code = code +format + "-0" + taskNum;
|
||||||
}else {
|
}else {
|
||||||
code = code + format + "-000" + taskNum;
|
code = code + format + "-000" + taskNum;
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
||||||
return maMachineMapper.getMaMachineByQrCode(qrCode);
|
return maMachineMapper.getMaMachineByQrCode(qrCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LeaseApplyDetails> leaseOutRecord(LeaseApplyDetails bean) {
|
||||||
|
return leaseOutDetailsMapper.leaseOutRecord(bean);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MaMachine> getMaMachineByRfidCode(String rfidCode) {
|
public List<MaMachine> getMaMachineByRfidCode(String rfidCode) {
|
||||||
return maMachineMapper.getMaMachineByRfidCode(rfidCode);
|
return maMachineMapper.getMaMachineByRfidCode(rfidCode);
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,20 @@ public class TmTaskServiceImpl implements TmTaskService {
|
||||||
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
||||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||||
if (leaseApplyInfo != null) {
|
if (leaseApplyInfo != null) {
|
||||||
|
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||||
|
//获取当前用户所属公司id
|
||||||
|
Long companyId = sysUser.getCompanyId();
|
||||||
|
//获取当前用户的角色
|
||||||
|
Set<String> roles = SecurityUtils.getLoginUser().getRoles();
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String s : roles) {
|
||||||
|
sb.append(s);
|
||||||
|
}
|
||||||
|
String rolesStr = sb.toString();
|
||||||
|
//如果是内部人员,加上所属公司
|
||||||
|
if ((rolesStr.contains("jjfgs") && !rolesStr.contains("admin")) || (rolesStr.contains("tsfgs") && !rolesStr.contains("admin"))) {
|
||||||
|
leaseApplyInfo.setCompanyId(Integer.parseInt(companyId.toString()));
|
||||||
|
}
|
||||||
// 去查询领料任务详情表
|
// 去查询领料任务详情表
|
||||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -429,8 +429,6 @@
|
||||||
GROUP BY mt.type_id
|
GROUP BY mt.type_id
|
||||||
) AS subquery2
|
) AS subquery2
|
||||||
ON subquery1.type_id = subquery2.type_id
|
ON subquery1.type_id = subquery2.type_id
|
||||||
WHERE
|
|
||||||
subquery1.out_num - COALESCE(subquery2.audit_num, 0)>0
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertTT" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.app.domain.TmTask" useGeneratedKeys="true">
|
<insert id="insertTt" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.app.domain.TmTask" useGeneratedKeys="true">
|
||||||
insert into tm_task
|
insert into tm_task
|
||||||
(
|
(
|
||||||
<if test="taskType != null">
|
<if test="taskType != null">
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertTTA">
|
<insert id="insertTta">
|
||||||
insert into tm_task_agreement
|
insert into tm_task_agreement
|
||||||
(
|
(
|
||||||
<if test="taskId != null">
|
<if test="taskId != null">
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertRAD">
|
<insert id="insertRad">
|
||||||
insert into repair_apply_details
|
insert into repair_apply_details
|
||||||
(
|
(
|
||||||
<if test="taskId != null">
|
<if test="taskId != null">
|
||||||
|
|
@ -418,7 +418,7 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertIAD">
|
<insert id="insertIad">
|
||||||
insert into input_apply_details
|
insert into input_apply_details
|
||||||
(
|
(
|
||||||
<if test="taskId != null">
|
<if test="taskId != null">
|
||||||
|
|
@ -486,7 +486,7 @@
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertSAD">
|
<insert id="insertSad">
|
||||||
insert into scrap_apply_details
|
insert into scrap_apply_details
|
||||||
(
|
(
|
||||||
<if test="taskId != null">
|
<if test="taskId != null">
|
||||||
|
|
@ -554,7 +554,7 @@
|
||||||
where ma_id = #{maId}
|
where ma_id = #{maId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateMT">
|
<update id="updateMt">
|
||||||
UPDATE ma_type
|
UPDATE ma_type
|
||||||
SET num = (IFNULL(num, 0)) + #{backNum}
|
SET num = (IFNULL(num, 0)) + #{backNum}
|
||||||
WHERE type_id = #{typeId}
|
WHERE type_id = #{typeId}
|
||||||
|
|
@ -590,9 +590,9 @@
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
|
||||||
WHERE
|
WHERE
|
||||||
tt.task_status>='38'
|
tt.task_status in (38,39,40)
|
||||||
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
|
||||||
ORDER BY bai.create_time desc
|
ORDER BY tt.task_status asc ,bai.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="receiveView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
<select id="receiveView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||||
|
|
@ -604,7 +604,8 @@
|
||||||
mt.type_name typeCode,
|
mt.type_name typeCode,
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
IFNULL(bad.audit_num,0)-(IFNULL(aa.back_num,0)) as num,
|
IFNULL(bad.audit_num,0)-(IFNULL(aa.back_num,0)) as num,
|
||||||
mt.manage_type as manageType
|
mt.manage_type as manageType,
|
||||||
|
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
||||||
FROM
|
FROM
|
||||||
back_apply_details bad
|
back_apply_details bad
|
||||||
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
LEFT JOIN back_apply_info bai on bai.id=bad.parent_id
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,40 @@
|
||||||
where ma_id = #{maId}
|
where ma_id = #{maId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="leaseOutRecord" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
|
||||||
|
SELECT
|
||||||
|
lod.id,
|
||||||
|
bui.unit_name as unitName,
|
||||||
|
bpl.lot_name as proName,
|
||||||
|
mt2.type_name as typeName,
|
||||||
|
mt.type_name as typeModelName,
|
||||||
|
lod.create_time as createTime,
|
||||||
|
lod.out_num as num
|
||||||
|
FROM
|
||||||
|
lease_out_details lod
|
||||||
|
LEFT JOIN lease_apply_info lai on lai.id=lod.parent_id
|
||||||
|
LEFT JOIN tm_task_agreement tta on tta.task_id=lai.task_id
|
||||||
|
LEFT JOIN bm_agreement_info bai on bai.agreement_id=tta.agreement_id
|
||||||
|
LEFT JOIN bm_project_lot bpl on bpl.lot_id=bai.project_id
|
||||||
|
LEFT JOIN bm_unit_info bui on bui.unit_id=bai.unit_id
|
||||||
|
LEFT JOIN ma_type mt on mt.type_id=lod.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||||
|
where 1=1
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (bui.unit_name like concat('%', #{keyWord}, '%') or
|
||||||
|
bpl.lot_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt2.type_name like concat('%', #{keyWord}, '%') or
|
||||||
|
mt.type_name like concat('%', #{keyWord}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' " >
|
||||||
|
and (lod.create_time like concat('%', #{startTime}, '%') or
|
||||||
|
lod.create_time like concat('%', #{endTime}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
ORDER BY lod.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateLeaseApplyDetailsOutNum">
|
<update id="updateLeaseApplyDetailsOutNum">
|
||||||
UPDATE
|
UPDATE
|
||||||
lease_apply_details
|
lease_apply_details
|
||||||
|
|
|
||||||
|
|
@ -604,6 +604,7 @@
|
||||||
direct_audit_by = #{record.companyAuditBy},
|
direct_audit_by = #{record.companyAuditBy},
|
||||||
direct_audit_time = now(),
|
direct_audit_time = now(),
|
||||||
direct_audit_remark = #{record.companyAuditRemark},
|
direct_audit_remark = #{record.companyAuditRemark},
|
||||||
|
status = #{record.status},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.examineStatusId == 33 and record.examineStatusId == '33'">
|
<if test="record.examineStatusId == 33 and record.examineStatusId == '33'">
|
||||||
update_by = #{record.companyAuditBy},
|
update_by = #{record.companyAuditBy},
|
||||||
|
|
@ -641,6 +642,7 @@
|
||||||
direct_audit_by = #{record.companyAuditBy},
|
direct_audit_by = #{record.companyAuditBy},
|
||||||
direct_audit_time = now(),
|
direct_audit_time = now(),
|
||||||
direct_audit_remark = #{record.companyAuditRemark},
|
direct_audit_remark = #{record.companyAuditRemark},
|
||||||
|
status = #{record.status},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
WHERE
|
WHERE
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="unitName != null">unit_name = #{unitName},</if>
|
<if test="unitName != null">unit_name = #{unitName},</if>
|
||||||
<if test="manageType != null">manage_type = #{manageType},</if>
|
<if test="manageType != null">manage_type = #{manageType},</if>
|
||||||
<if test="leasePrice != null">lease_price = #{leasePrice},</if>
|
<if test="leasePrice != null">lease_price = #{leasePrice},</if>
|
||||||
|
<if test="rentPrice != null">rent_price = #{rentPrice},</if>
|
||||||
<if test="effTime != null">eff_time = #{effTime},</if>
|
<if test="effTime != null">eff_time = #{effTime},</if>
|
||||||
<if test="buyPrice != null">buy_price = #{buyPrice},</if>
|
<if test="buyPrice != null">buy_price = #{buyPrice},</if>
|
||||||
<if test="payPrice != null">pay_price = #{payPrice},</if>
|
<if test="payPrice != null">pay_price = #{payPrice},</if>
|
||||||
|
|
@ -329,7 +330,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getListByParentId" resultMap="MaTypeResult">
|
<select id="getListByParentId" resultMap="MaTypeResult">
|
||||||
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
select m.type_id, m.type_name, m.parent_id, m.status, m.num, m.unit_id, m.unit_name, m.manage_type,
|
||||||
m.lease_price, m.eff_time, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
m.lease_price,m.rent_price, m.eff_time, m.buy_price, m.pay_price, m.level, m.rated_load, m.test_load,
|
||||||
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
m.holding_time, m.warn_num, mtf.file_name photoName, mtf.file_url photoUrl,
|
||||||
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId,
|
||||||
su.user_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
su.user_name keeperUserName, mpi.prop_name, m.del_flag, m.create_by, m.create_time,
|
||||||
|
|
|
||||||
|
|
@ -503,9 +503,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mt.type_id
|
mt.type_id
|
||||||
) AS subquery2 ON subquery1.type_id = subquery2.type_id
|
) AS subquery2 ON subquery1.type_id = subquery2.type_id
|
||||||
WHERE
|
) mt4 on mt4.typeId = mt.type_id
|
||||||
subquery1.out_num - COALESCE ( subquery2.audit_num, 0 )> 0) mt4 on mt4.typeId = mt.type_id
|
HAVING num is not null
|
||||||
HAVING num> 0
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT ma_type.type_id, ma_type.parent_id,ma_type.type_name as typeCode, ma_type.`level`,ma_type.unit_name,0 as
|
SELECT ma_type.type_id, ma_type.parent_id,ma_type.type_name as typeCode, ma_type.`level`,ma_type.unit_name,0 as
|
||||||
num
|
num
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue