371d14dd 康伟

kangwei :修改bug

1 个父辈 6256fe9c
......@@ -83,10 +83,7 @@ public class DistributContractController {
HttpServletRequest req) {
Result<List<DistributContract>> result = new Result<List<DistributContract>>();
QueryWrapper<DistributContract> queryWrapper = QueryGenerator.initQueryWrapper(distributContract, req.getParameterMap());
// 需要添加条件判断
queryWrapper.eq("status" , "3");// 审核通过
List<DistributContract> dataList = distributContractService.list(queryWrapper);
result.setSuccess(true);
result.setResult(dataList);
......@@ -109,7 +106,6 @@ public class DistributContractController {
result.success("添加成功!");
}
}
} catch (Exception e) {
log.error(e.getMessage(),e);
result.error500("操作失败");
......
......@@ -136,7 +136,7 @@ public class MaterialAcceptanceFormController {
if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign())){
materialAcceptanceForm.setConfirmStatus("2");
}
if(StringUtils.isNotBlank(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotBlank(materialAcceptanceForm.getReceiverSign()) ){
if(StringUtils.isNotEmpty(materialAcceptanceForm.getSenderSign()) && StringUtils.isNotEmpty(materialAcceptanceForm.getReceiverSign()) ){
materialAcceptanceForm.setConfirmStatus("9");
}
MaterialAcceptanceForm materialAcceptanceFormEntity = materialAcceptanceFormService.getById(materialAcceptanceForm.getId());
......
......@@ -32,7 +32,9 @@ import com.skua.modules.erp.util.PdfUtil;
import com.skua.modules.erp.vo.ArrivalRecordExcelExportVO;
import com.skua.modules.erp.vo.MaterialINVO;
import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
import com.skua.modules.supplies.entity.EquipmentSparepartType;
import com.skua.modules.supplies.service.IEquipmentSparepartSuppliesService;
import com.skua.modules.supplies.service.IEquipmentSparepartTypeService;
import com.skua.modules.system.entity.SysDepart;
import com.skua.modules.system.service.ISysDepartService;
import lombok.extern.slf4j.Slf4j;
......@@ -81,6 +83,8 @@ public class MaterialINController {
private ISysDepartService departService;
@Autowired
private IMaterialAcceptanceFormService materialAcceptanceFormService;//验收单
@Autowired
private IEquipmentSparepartTypeService sparepartTypeService;
/**
* <pre>
* 分页列表查询
......@@ -102,10 +106,10 @@ public class MaterialINController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>();
QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();// QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize);
if(StringUtils.isNotBlank(materialIN.getDepartId())){
/*if(StringUtils.isNotBlank(materialIN.getDepartId())){
queryWrapper.eq("depart_id",materialIN.getDepartId());
}
if(StringUtils.isNotBlank(materialIN.getAuditStatus())){
......@@ -122,8 +126,8 @@ public class MaterialINController {
}
if(StringUtils.isNotBlank(materialIN.getEndTime())){
queryWrapper.le("arrive_time",materialIN.getEndTime());
}
}*/
queryWrapper.orderByDesc("arrive_time");
IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -137,17 +141,17 @@ public class MaterialINController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>();
QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();//QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize);
if(StringUtils.isNotBlank(materialIN.getDepartId())){
/*if(StringUtils.isNotBlank(materialIN.getDepartId())){
queryWrapper.eq("depart_id",materialIN.getDepartId());
}
if(StringUtils.isNotBlank(materialIN.getAuditStatus())){
queryWrapper.eq("audit_status",materialIN.getAuditStatus());
}
/*if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){
*//*if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){
queryWrapper.eq("confirm_status",materialIN.getConfirmStatus());
}*/
}*//*
if(StringUtils.isNotBlank(materialIN.getGoodCode())){
queryWrapper.like("good_code",materialIN.getGoodCode());
}
......@@ -156,14 +160,16 @@ public class MaterialINController {
}
if(StringUtils.isNotBlank(materialIN.getEndTime())){
queryWrapper.le("arrive_time",materialIN.getEndTime());
}
}*/
// 需要添加条件判断
queryWrapper.gt("status" , "0");// >0
queryWrapper.ne("status" , "2"); // 不等于2
if(StringUtils.isEmpty(materialIN.getAuditStatus())){
queryWrapper.gt("audit_status" , "0");// >0
queryWrapper.ne("audit_status" , "2"); // 不等于2
}
queryWrapper.eq("confirm_status","2");
queryWrapper.orderByDesc("arrive_time");
IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -196,6 +202,7 @@ public class MaterialINController {
}
queryWrapper.eq("audit_status","3");
List<MaterialIN> pageList = materialINService.list( queryWrapper);*/
List<ArrivalRecordExcelExportVO> pageList = materialINService.queryArrivalRecordByList(materialIN);
result.setSuccess(true);
......@@ -329,6 +336,11 @@ public class MaterialINController {
public Result<MaterialIN> queryById(@RequestParam(name="id",required=true) String id) {
Result<MaterialIN> result = new Result<MaterialIN>();
MaterialIN materialIN = materialINService.getById(id);
EquipmentSparepartType sparepartType = sparepartTypeService.getById(materialIN.getSparepartType());
if(sparepartType != null ){
materialIN.setSparepartTypeName( sparepartType.getItemText() );
}
if(materialIN==null) {
result.error500("未找到对应实体");
}else {
......
package com.skua.modules.erp.controller;
import java.util.Arrays;
import java.util.List;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
......@@ -17,6 +16,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.erp.vo.PurchaseContractVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
......@@ -49,6 +49,10 @@ public class PurchaseContractController {
Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize);
// 需要添加条件判断
if(StringUtils.isEmpty(ERPPurchaseContract.getStatus())){
queryWrapper.lt("status" , "3");// >0
}
// 需要添加条件判断
IPage<ERPPurchaseContract> pageList = purchaseContractService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -57,18 +61,19 @@ public class PurchaseContractController {
@AutoLog(value = "erp采购合同-集团审核列表")
@ApiOperation(value="erp采购合同-集团审核列表", notes="erp采购合同-集团审核列表")
@GetMapping(value = "/handleList")
public Result<IPage<ERPPurchaseContract>> handleList(ERPPurchaseContract ERPPurchaseContract,
public Result<IPage<ERPPurchaseContract>> handleList(ERPPurchaseContract purchaseContract,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<ERPPurchaseContract>> result = new Result<IPage<ERPPurchaseContract>>();
QueryWrapper<ERPPurchaseContract> queryWrapper = QueryGenerator.initQueryWrapper(ERPPurchaseContract, req.getParameterMap());
QueryWrapper<ERPPurchaseContract> queryWrapper = QueryGenerator.initQueryWrapper(purchaseContract, req.getParameterMap());
Page<ERPPurchaseContract> page = new Page<ERPPurchaseContract>(pageNo, pageSize);
// 需要添加条件判断
queryWrapper.gt("status" , "0");// >0
queryWrapper.ne("status" , "2"); // 不等于2
if(StringUtils.isEmpty(purchaseContract.getStatus())){
queryWrapper.gt("status" , "0");// >0
queryWrapper.ne("status" , "2"); // 不等于2
}
IPage<ERPPurchaseContract> pageList = purchaseContractService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -81,12 +86,18 @@ public class PurchaseContractController {
public Result<List<ERPPurchaseContract>> purchaseContractList() {
Result<List<ERPPurchaseContract>> result = new Result<List<ERPPurchaseContract>>();
QueryWrapper<ERPPurchaseContract> queryWrapper = new QueryWrapper<ERPPurchaseContract> (); // QueryGenerator.initQueryWrapper(ERPPurchaseContract, req.getParameterMap());
queryWrapper.like("departs", BaseContextHandler.getRealDepartId());
/* queryWrapper.like("departs", BaseContextHandler.getRealDepartId());*/
queryWrapper.orderByDesc("create_time");
// 需要添加条件判断
List<ERPPurchaseContract> pageList = purchaseContractService.list( queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
List<ERPPurchaseContract> purchaseContractList = purchaseContractService.list( queryWrapper);
/*Set<ERPPurchaseContract> dataList = new HashSet<>();
HashSet set = new HashSet(purchaseContractList);
purchaseContractList.clear();
purchaseContractList.addAll(set);*/
result.setSuccess(true);
result.setResult(purchaseContractList);
return result;
}
......
......@@ -75,7 +75,7 @@ public class PurchasePlanController {
Result<IPage<PurchasePlan>> result = new Result<IPage<PurchasePlan>>();
QueryWrapper<PurchasePlan> queryWrapper = QueryGenerator.initQueryWrapper(purchasePlan, req.getParameterMap());
Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize);
if(StringUtils.isNotEmpty( purchasePlan.getDepartId() ) ){
/*if(StringUtils.isNotEmpty( purchasePlan.getDepartId() ) ){
queryWrapper.eq("depart_id", purchasePlan.getDepartId());
}
if(StringUtils.isNotEmpty( purchasePlan.getStatus() ) ){
......@@ -87,7 +87,7 @@ public class PurchasePlanController {
if(StringUtils.isNotEmpty( purchasePlan.getApplyUser()) ){
queryWrapper.like("apply_user", purchasePlan.getApplyUser());
}
}*/
queryWrapper.orderByDesc("create_time");
IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper);
......@@ -109,7 +109,7 @@ public class PurchasePlanController {
Page<PurchasePlan> page = new Page<PurchasePlan>(pageNo, pageSize);
if(StringUtils.isNotEmpty( purchasePlan.getDepartId() ) ){
/*if(StringUtils.isNotEmpty( purchasePlan.getDepartId() ) ){
queryWrapper.eq("depart_id", purchasePlan.getDepartId());
}else{
//如果为管理员,则跳过权限
......@@ -117,17 +117,18 @@ public class PurchasePlanController {
queryWrapper.in("depart_id", BaseContextHandler.getDeparts().split(","));
}
}
if(StringUtils.isNotEmpty( purchasePlan.getStatus() ) ){
queryWrapper.eq("status", purchasePlan.getStatus());
}else{
queryWrapper.gt("status" , "0");// >0
queryWrapper.ne("status" , "2"); // 不等于2
}
if( StringUtils.isNotEmpty( purchasePlan.getApplyYear()) ){
queryWrapper.eq("apply_year", purchasePlan.getApplyYear());
}
if( StringUtils.isNotEmpty( purchasePlan.getApplyUser() ) ){
queryWrapper.like("apply_user", purchasePlan.getApplyUser());
}*/
if(StringUtils.isNotEmpty( purchasePlan.getStatus() ) ){
queryWrapper.eq("status", purchasePlan.getStatus());
}else{
queryWrapper.gt("status" , "0");// >0
queryWrapper.ne("status" , "2"); // 不等于2
}
queryWrapper.orderByDesc("create_time");
IPage<PurchasePlan> pageList = purchasePlanService.page(page, queryWrapper);
......
......@@ -25,7 +25,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
@Accessors(chain = true)
@ApiModel(value="erp_material_in对象", description="物料(药剂)入库")
public class MaterialIN {
/**id*/
@TableId(type = IdType.ID_WORKER_STR)
@ApiModelProperty(value = "id")
......@@ -95,7 +95,7 @@ public class MaterialIN {
/**供应商编号*/
@Excel(name = "供应商编号", width = 15)
@ApiModelProperty(value = "供应商编号")
@Dict(dictTable = "equipment_sparepart_supplies", dicCode="id", dicText = "sparepart_name")
@Dict(dictTable = "ajh_supplier_manage", dicCode="id", dicText = "supp_name")
private String supplierId;
/**货号*/
@Excel(name = "货号", width = 15)
......@@ -193,4 +193,9 @@ public class MaterialIN {
@TableField(exist = false)
@ApiModelProperty(value = "开始时间")
private String startTime;
@TableField(exist = false)
@ApiModelProperty(value = "物料类别")
private String sparepartTypeName;
}
......
......@@ -31,7 +31,7 @@
and mi.supplier_id = #{supplierId}
</if>
</where>
order by arrive_time desc
</select>
<!--获取入库审批列表:根据部门、采购合同、供应商、药剂分组搜索 -->
......@@ -64,4 +64,4 @@
</mapper>
\ No newline at end of file
</mapper>
......
......@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.query.QueryGenerator;
import com.skua.modules.safe.entity.DangerInspectionRecord;
import com.skua.modules.safe.entity.DangerLevelManage;
import com.skua.modules.safe.service.IDangerInspectionItemService;
import com.skua.modules.safe.service.IDangerInspectionRecordService;
import com.skua.modules.safe.vo.DangerInspectionRecordVO;
import com.skua.modules.safe.vo.DangerLevelManageVO;
......@@ -18,7 +15,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -60,10 +56,6 @@ public class APPDangerInspectionRecordController {
QueryWrapper<DangerInspectionRecord> queryWrapper = new QueryWrapper<DangerInspectionRecord>();// QueryGenerator.initQueryWrapper(dangerInspectionRecord, req.getParameterMap());
Page<DangerInspectionRecord> page = new Page<DangerInspectionRecord>(pageNo, pageSize);
if(dangerInspectionRecord.getDepartId() != null && dangerInspectionRecord.getDepartId().length() > 0 ){
queryWrapper.eq("depart_id", dangerInspectionRecord.getDepartId());
}
if(dangerInspectionRecord.getEquipInfoId() != null && dangerInspectionRecord.getEquipInfoId().length() > 0 ){
queryWrapper.eq("equip_info_id", dangerInspectionRecord.getEquipInfoId());
}
......@@ -83,6 +75,7 @@ public class APPDangerInspectionRecordController {
queryWrapper.eq("status", dangerInspectionRecord.getStatus() ) ;
}
queryWrapper.orderByDesc("report_date");
// queryWrapper.eq("report_user", BaseContextHandler.getUserId());
IPage<DangerInspectionRecord> pageList = dangerInspectionRecordService.page(page, queryWrapper);
result.setSuccess(true);
......@@ -116,8 +109,6 @@ public class APPDangerInspectionRecordController {
}
//Statistics
@AutoLog(value = "隐患排查记录:根据风险点统计记录")
@ApiOperation(value="隐患排查记录:根据风险点统计记录", notes="隐患排查记录:根据风险点统计记录")
@GetMapping(value = "/statistics")
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!