Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
891cfc3dce
|
|
@ -81,4 +81,6 @@ public class HandlingOrder implements Serializable {
|
|||
|
||||
private String signUrl;
|
||||
|
||||
private Long companyId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.bonus.material.common.domain.vo.AgreementVo;
|
|||
import com.bonus.material.common.mapper.SelectMapper;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyInfoMapper;
|
||||
import com.bonus.material.ma.mapper.MachineMapper;
|
||||
import com.bonus.material.ma.service.ITypeService;
|
||||
import com.bonus.material.purchase.config.RemoteConfig;
|
||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||
import com.bonus.material.settlement.mapper.SltAgreementInfoMapper;
|
||||
|
|
@ -96,6 +97,9 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
@Resource
|
||||
private BmUnitMapper bmUnitMapper;
|
||||
|
||||
@Resource
|
||||
private ITypeService iTypeService;
|
||||
|
||||
/**
|
||||
* 查询退料任务 - 性能优化版
|
||||
*
|
||||
|
|
@ -2215,6 +2219,11 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
try {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
bean.setCreateBy(userId.toString());
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId);
|
||||
int re = backApplyInfoMapper.addHandlingOrder(bean);
|
||||
if (re>0){
|
||||
return AjaxResult.success("添加成功");
|
||||
|
|
@ -2229,6 +2238,11 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
|
||||
@Override
|
||||
public List<HandlingOrder> getHandlingOrderList(HandlingOrder bean) {
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId);
|
||||
List<HandlingOrder> list = backApplyInfoMapper.getHandlingOrderList(bean);
|
||||
if (list.size()>0){
|
||||
for (HandlingOrder handlingOrder : list){
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
|||
import com.bonus.material.basic.service.ComplexQueryService;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.service.ITypeService;
|
||||
import com.bonus.material.part.domain.PartInventory;
|
||||
import com.bonus.material.push.domain.MachineInfoBean;
|
||||
import com.bonus.material.push.domain.MachineInfoExport;
|
||||
|
|
@ -43,6 +44,9 @@ public class ComplexQueryController extends BaseController {
|
|||
@Resource
|
||||
private ComplexQueryService complexQueryService;
|
||||
|
||||
@Resource
|
||||
private ITypeService typeService;
|
||||
|
||||
/**
|
||||
* 保有设备总量查询
|
||||
* @param bean
|
||||
|
|
@ -53,6 +57,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getRetainedEquipmentList(RetainedEquipmentInfo bean) {
|
||||
bean.setIsExport(1);
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(Math.toIntExact(deptId));
|
||||
if (bean.getIsApp() != null && bean.getIsApp() == 1) {
|
||||
List<RetainedEquipmentInfo> pageList = complexQueryService.getRetainedEquipmentList(bean);
|
||||
return AjaxResult.success(pageList);
|
||||
|
|
@ -72,6 +78,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getRetainedEquipmentListNoPage(RetainedEquipmentInfo bean) {
|
||||
bean.setIsExport(0);
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(Math.toIntExact(deptId));
|
||||
List<RetainedEquipmentInfo> list = complexQueryService.getRetainedEquipmentList(bean);
|
||||
RetainedEquipmentInfo dto = new RetainedEquipmentInfo();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
|
|
@ -105,6 +113,8 @@ public class ComplexQueryController extends BaseController {
|
|||
{
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
bean.setIsExport(0);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(Math.toIntExact(deptId));
|
||||
List<RetainedEquipmentInfo> list = complexQueryService.getRetainedEquipmentList(bean);
|
||||
ExcelUtil<RetainedEquipmentInfo> util = new ExcelUtil<>(RetainedEquipmentInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--保有设备总量查询");
|
||||
|
|
@ -147,6 +157,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getUserRecords(UseStorageInfo bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<UseStorageInfo> list = complexQueryService.getUserRecords(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
|
@ -159,6 +171,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@ApiOperation(value = "综合查询--导出在用设备详情")
|
||||
@PostMapping("/exportUserRecordList")
|
||||
public void exportUserRecordList(HttpServletResponse response, UseStorageInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<UseStorageInfo> list = complexQueryService.getUserRecords(bean);
|
||||
ExcelUtil<UseStorageInfo> util = new ExcelUtil<>(UseStorageInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出在用设备详情");
|
||||
|
|
@ -174,6 +188,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getRepairRecordList(RepairStorageInfo bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<RepairStorageInfo> list = complexQueryService.getRepairRecordList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
|
@ -186,6 +202,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@ApiOperation(value = "综合查询--导出在修设备详情")
|
||||
@PostMapping("/exportRepairRecordList")
|
||||
public void exportRepairRecordList(HttpServletResponse response, RepairStorageInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<RepairStorageInfo> list = complexQueryService.getRepairRecordList(bean);
|
||||
ExcelUtil<RepairStorageInfo> util = new ExcelUtil<>(RepairStorageInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出在修设备详情");
|
||||
|
|
@ -200,6 +218,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@GetMapping("/getPurchaseRecordList")
|
||||
public AjaxResult getPurchaseRecordList(PurchaseInputInfo bean) {
|
||||
startPage();
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<PurchaseInputInfo> list = complexQueryService.getPurchaseRecordList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
|
@ -212,6 +232,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@ApiOperation(value = "综合查询--导出新购待入库详情")
|
||||
@PostMapping("/exportPurchaseRecordList")
|
||||
public void exportPurchaseRecordList(HttpServletResponse response, PurchaseInputInfo bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<PurchaseInputInfo> list = complexQueryService.getPurchaseRecordList(bean);
|
||||
ExcelUtil<PurchaseInputInfo> util = new ExcelUtil<>(PurchaseInputInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出新购待入库详情");
|
||||
|
|
@ -226,6 +248,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@GetMapping("/getRepairInputList")
|
||||
public AjaxResult getRepairInputList(RepairInputRecord bean) {
|
||||
startPage();
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<RepairInputRecord> list = complexQueryService.getRepairInputList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
|
@ -238,6 +262,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@ApiOperation(value = "综合查询--导出修饰待入库详情")
|
||||
@PostMapping("/exportRepairInputList")
|
||||
public void exportRepairInputList(HttpServletResponse response, RepairInputRecord bean) {
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<RepairInputRecord> list = complexQueryService.getRepairInputList(bean);
|
||||
ExcelUtil<RepairInputRecord> util = new ExcelUtil<>(RepairInputRecord.class);
|
||||
util.exportExcel(response, list, "综合查询--导出修饰待入库详情");
|
||||
|
|
@ -358,6 +384,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getMachineHistoryRecordList(MachineHistoryRecordBean bean) {
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
startPage();
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<MachineHistoryRecordBean> list = complexQueryService.getMachineHistoryRecordList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
|
@ -372,6 +400,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public void exportMachineHistoryRecord(HttpServletResponse response, MachineHistoryRecordBean bean)
|
||||
{
|
||||
bean.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<MachineHistoryRecordBean> list = complexQueryService.getMachineHistoryRecordList(bean);
|
||||
ExcelUtil<MachineHistoryRecordBean> util = new ExcelUtil<>(MachineHistoryRecordBean.class);
|
||||
util.exportExcel(response, list, "综合查询--设备使用追溯查询");
|
||||
|
|
@ -385,6 +415,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getInputRecordList(InputRecordInfo bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<InputRecordInfo> list = complexQueryService.getInputRecordList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
|
@ -398,6 +430,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@PostMapping("/exportInputRecord")
|
||||
public void exportInputRecord(HttpServletResponse response, InputRecordInfo bean)
|
||||
{
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<InputRecordInfo> list = complexQueryService.getInputRecordList(bean);
|
||||
ExcelUtil<InputRecordInfo> util = new ExcelUtil<>(InputRecordInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--机具入库查询");
|
||||
|
|
@ -413,6 +447,8 @@ public class ComplexQueryController extends BaseController {
|
|||
public AjaxResult getOutRecordList(OutRecordInfo bean) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<OutRecordInfo> list = complexQueryService.getOutRecordList(bean);
|
||||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
|
@ -421,6 +457,8 @@ public class ComplexQueryController extends BaseController {
|
|||
@PostMapping("/exportOutRecord")
|
||||
public void exportOutRecord(HttpServletResponse response, OutRecordInfo bean)
|
||||
{
|
||||
Long deptId = typeService.getUserDeptId();
|
||||
bean.setCompanyId(deptId);
|
||||
List<OutRecordInfo> list = complexQueryService.getOutRecordList(bean);
|
||||
ExcelUtil<OutRecordInfo> util = new ExcelUtil<>(OutRecordInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--机具出库查询");
|
||||
|
|
|
|||
|
|
@ -82,4 +82,7 @@ public class InputRecordInfo {
|
|||
@ApiModelProperty(value = "装备管理方式")
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
|
||||
}
|
||||
|
|
@ -109,4 +109,7 @@ public class MachineHistoryRecordBean {
|
|||
private String keyWord;
|
||||
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,4 +109,7 @@ public class OutRecordInfo {
|
|||
|
||||
@ApiModelProperty(value = "一级ID集合")
|
||||
private List<Integer> firstTypeIdList;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,4 +65,7 @@ public class PurchaseInputInfo {
|
|||
private String keyWord;
|
||||
|
||||
private String manageType;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,4 +64,7 @@ public class RepairInputRecord {
|
|||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,4 +70,7 @@ public class RepairStorageInfo {
|
|||
|
||||
@ApiModelProperty(value = "维修类型 1 定损 2 在修 3 修试待审核")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,4 +70,7 @@ public class UseStorageInfo {
|
|||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -656,6 +656,11 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
@Override
|
||||
public List<ProjUsingRecord> getStatisticsList(ProjUsingRecord bean) {
|
||||
try {
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId.intValue());
|
||||
// 1、查询工程对应的物资名称、型号、需求数量、已供数量
|
||||
List<ProjUsingRecord> list = complexQueryMapper.getStatisticsList(bean);
|
||||
|
||||
|
|
@ -876,6 +881,11 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
*/
|
||||
@Override
|
||||
public List<MachineInfoBean> getFinishNoReturnList(MachineInfoBean bean) {
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId);
|
||||
return complexQueryMapper.getFinishNoReturnList(bean);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -608,6 +608,8 @@ public class SelectServiceImpl implements SelectService {
|
|||
*/
|
||||
@Override
|
||||
public List<MaterialRetainedEquipmentInfo> getImpUnitNameList(MaterialRetainedEquipmentInfo bean) {
|
||||
Long companyId=typeService.getUserDeptId();
|
||||
bean.setCompanyId(companyId.intValue());
|
||||
return mapper.getImpUnitNameList(bean);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
|
|
@ -59,12 +56,22 @@ public class ExpectationsServiceImpl implements ExpectationsService {
|
|||
@Override
|
||||
public AjaxResult getCountExpectations(ExpectationsEntity entity) {
|
||||
try {
|
||||
/**
|
||||
* jsk
|
||||
*/
|
||||
Long companyId=iTypeService.getUserDeptId();
|
||||
entity.setCompanyId(companyId);
|
||||
Map<String, Objects> countExpectations = mapper.getCountExpectations(entity);
|
||||
if (entity != null && "2".equals(entity.getUseStatus())) {
|
||||
//在用设备量
|
||||
countExpectations = mapper.getUseCountExpectations(entity);
|
||||
}
|
||||
return ObjectUtils.isNotEmpty(countExpectations) ? AjaxResult.success(countExpectations) : AjaxResult.error();
|
||||
Map<String,String> map=new HashMap<>();
|
||||
if(!ObjectUtils.isNotEmpty(countExpectations)){
|
||||
map.put("expired","0");
|
||||
map.put("aboutToExpire","0");
|
||||
}
|
||||
return ObjectUtils.isNotEmpty(countExpectations) ? AjaxResult.success(countExpectations) : AjaxResult.success(map);
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
return AjaxResult.error();
|
||||
|
|
|
|||
|
|
@ -69,4 +69,5 @@ public class MachineInfoBean {
|
|||
//租赁价格
|
||||
private String leasePrice;
|
||||
|
||||
private Long companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1129,6 +1129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_project bp on bp.pro_id = bho.pro_id
|
||||
LEFT JOIN sys_user su on su.user_id=bho.update_by
|
||||
WHERE bho.is_active = '1'
|
||||
<if test="companyId !=null and companyId !=''">
|
||||
and bp.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
and bho.reserve_date BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -206,6 +206,9 @@
|
|||
END = #{statusName}
|
||||
)
|
||||
</if>
|
||||
<if test="companyId!=null">
|
||||
and sai.company_id = #{companyId}
|
||||
</if>
|
||||
ORDER BY
|
||||
sai.end_time
|
||||
</select>
|
||||
|
|
@ -260,6 +263,9 @@
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND bs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="companyId!=null">
|
||||
and bs.company_id = #{companyId}
|
||||
</if>
|
||||
order by bs.create_time desc
|
||||
</select>
|
||||
|
||||
|
|
@ -335,6 +341,9 @@
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND bs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="companyId!=null">
|
||||
and bs.company_id = #{companyId}
|
||||
</if>
|
||||
order by bs.create_time desc
|
||||
</select>
|
||||
|
||||
|
|
@ -405,6 +414,9 @@
|
|||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
WHERE mm.ma_code is not null and mm.ma_status in (1)
|
||||
<if test="companyId !=null">
|
||||
AND mm.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY mt.type_id) AS subquery0 ON subquery0.type_id = mt.type_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
|
|
@ -428,6 +440,9 @@
|
|||
AND (sai.source = 1 OR sai.source is NULL)
|
||||
AND sai.end_time IS NULL
|
||||
AND sai.back_id IS NULL
|
||||
<if test="companyId !=null">
|
||||
AND sai.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY mt.type_id
|
||||
) AS subquery1
|
||||
ON mt.type_id = subquery1.type_id
|
||||
|
|
@ -452,6 +467,9 @@
|
|||
WHERE
|
||||
tt.task_status IN (0, 4)
|
||||
and tt.code is not null
|
||||
<if test="companyId !=null">
|
||||
AND rad.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id) AS subquery2 ON subquery2.type_id = mt.type_id
|
||||
LEFT JOIN (
|
||||
|
|
@ -474,6 +492,9 @@
|
|||
WHERE
|
||||
tt.code is not null
|
||||
and rad.`status` = '0'
|
||||
<if test="companyId !=null">
|
||||
AND rad.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id) AS subquery12 ON subquery12.type_id = mt.type_id
|
||||
LEFT JOIN (
|
||||
|
|
@ -496,6 +517,9 @@
|
|||
LEFT JOIN tm_task tt ON rid.task_id = tt.task_id
|
||||
WHERE IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) - IFNULL(rid.reject_num, 0) > 0
|
||||
and tt.task_status = 0
|
||||
<if test="companyId !=null">
|
||||
AND rid.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id) AS subquery3 ON subquery3.type_id = mt.type_id
|
||||
LEFT JOIN (
|
||||
|
|
@ -517,6 +541,9 @@
|
|||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||
WHERE IFNULL(pcd.check_num, 0) - IFNULL(pcd.input_num, 0) > 0
|
||||
and pcd.status in (3,4, 13,14)
|
||||
<if test="companyId !=null">
|
||||
AND pcd.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mt.type_id) AS subquery4 ON subquery4.type_id = mt.type_id
|
||||
/*LEFT JOIN (
|
||||
|
|
@ -600,6 +627,9 @@
|
|||
<if test="jiJuType != null and jiJuType != ''">
|
||||
AND mt.jiju_type = #{jiJuType}
|
||||
</if>
|
||||
<if test="companyId !=null">
|
||||
and mt.company_id = #{companyId}
|
||||
</if>
|
||||
HAVING allNum > 0
|
||||
order by mt4.type_name, mt3.type_name, mt2.type_name, mt.type_name
|
||||
</select>
|
||||
|
|
@ -641,6 +671,9 @@
|
|||
sai.is_slt = '0'
|
||||
and bp.pro_name is not null
|
||||
and mt.del_flag='0'
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and mt.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT( sai.start_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
|
@ -696,6 +729,9 @@
|
|||
and mt.del_flag=0
|
||||
and tt.task_type = '2'
|
||||
and tt.task_status in (3, 4)
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and mt.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT( lad.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
|
@ -747,6 +783,9 @@
|
|||
bp.pro_name is not null
|
||||
and mt.del_flag='0'
|
||||
and tt.task_type = '19'
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and mt.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT( lpd.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
|
|
@ -1022,6 +1061,9 @@
|
|||
<if test="typeId != null">
|
||||
AND type_id = #{typeId}
|
||||
</if>
|
||||
<if test="companyId !=null">
|
||||
AND company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
type_id,
|
||||
ma_id,
|
||||
|
|
@ -1088,6 +1130,9 @@
|
|||
su.nick_name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
AND rad.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY mm.ma_id,tt.`code`,mt.type_id
|
||||
</select>
|
||||
|
||||
|
|
@ -1120,6 +1165,9 @@
|
|||
<if test="typeId != null">
|
||||
AND pcd.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="companyId!=null">
|
||||
AND pcd.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY tt.`code`,
|
||||
mt.type_id
|
||||
</select>
|
||||
|
|
@ -1171,6 +1219,9 @@
|
|||
mm.ma_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
AND rid.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY mm.ma_id, tt.`code`, mt.type_id
|
||||
</select>
|
||||
|
||||
|
|
@ -1688,6 +1739,9 @@
|
|||
<foreach item="item" collection="list" index="index" separator="," close=")" open="(">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="companyId != null">
|
||||
and lod.company_id= #{companyId}
|
||||
</if>
|
||||
GROUP BY lod.parent_id
|
||||
</select>
|
||||
|
||||
|
|
@ -1958,6 +2012,9 @@
|
|||
su.nick_name like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="companyId!=null">
|
||||
AND rad.company_id = #{companyId}
|
||||
</if>
|
||||
GROUP BY mm.ma_id,tt.`code`,mt.type_id
|
||||
</select>
|
||||
<select id="getPartInventory" resultType="com.bonus.material.part.domain.PartInventory">
|
||||
|
|
@ -2171,6 +2228,9 @@
|
|||
and bai.is_show = 1
|
||||
and mt.jiju_type = 1
|
||||
and mt2.is_statics != 1
|
||||
<if test="companyId != null and companyId != ''">
|
||||
and mt.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''">
|
||||
and sd.dept_name = #{deptName}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -1427,6 +1427,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="proName != null and proName != ''">
|
||||
AND bp.pro_name LIKE CONCAT('%', #{proName}, '%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND bp.company_id=#{companyId}
|
||||
</if>
|
||||
<if test="projectIdList != null and projectIdList.size() > 0">
|
||||
AND bp.external_id in
|
||||
<foreach item="item" collection="projectIdList" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
)
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND mm.company_id=#{companyId}
|
||||
AND mt1.company_id=#{companyId}
|
||||
</if>
|
||||
GROUP BY
|
||||
mm.type_id,
|
||||
|
|
@ -55,6 +55,9 @@
|
|||
WHERE mm.ma_status = #{useStatus}
|
||||
AND mm.next_check_time < DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
||||
AND mt2.type_id not in (6032,6008,6270)
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND mt.company_id=#{companyId}
|
||||
</if>
|
||||
GROUP BY name;
|
||||
</select>
|
||||
<select id="getListDetails" resultType="com.bonus.material.expectations.domain.ExpectationsEntity">
|
||||
|
|
@ -121,6 +124,9 @@
|
|||
AND sai.`status` = '0'
|
||||
AND mm.next_check_time < DATE_ADD(CURDATE(), INTERVAL 30 DAY)
|
||||
AND mt2.type_id not in (6032,6008,6270)
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND mt.company_id=#{companyId}
|
||||
</if>
|
||||
GROUP BY name;
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue