Merge branch 'main' of http://120.48.141.82:3000/licq/heli-mes
This commit is contained in:
commit
e548ac1986
@ -18,7 +18,7 @@ const categoryList = ref([
|
||||
},
|
||||
{
|
||||
path: 'unqualifiedNotification',
|
||||
name: '品质异常通知',
|
||||
name: '品质异常审核',
|
||||
auth: false,
|
||||
imgUrl: '/static/images/unqualifiedNotification.png',
|
||||
defaultImgUrl: '/static/images/unqualifiedNotification-default.png',
|
||||
|
@ -147,6 +147,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode ZJ_BG_MASTER_LINE_NOT_EXISTS = new ErrorCode(1_011_001, "终检报工不存在");
|
||||
|
||||
ErrorCode MASTER_NOT_EXISTS = new ErrorCode(1_011_001, "借用主不存在");
|
||||
ErrorCode MASTER_LINE_NOT_EXISTS = new ErrorCode(1_011_002, "借用物料行不存在");
|
||||
|
||||
ErrorCode ORDER_YF_NOT_EXISTS = new ErrorCode(1_011_001, "应付记录不存在");
|
||||
ErrorCode ORDER_YS_NOT_EXISTS = new ErrorCode(1_011_001, "应收记录不存在");
|
||||
|
@ -10,6 +10,7 @@ import lombok.Getter;
|
||||
@Getter
|
||||
public enum TaskDispatchStatusEnum {
|
||||
|
||||
Unedited(0, "未编辑"),
|
||||
SAVE(1, "已保存"),
|
||||
SUBMIT(2, "已提交"),
|
||||
CANCEL_SUBMIT(1, "取消提交"),
|
||||
|
@ -159,8 +159,8 @@ public class bdgzsomthingController {
|
||||
//@Scheduled(cron = "0 2 0 * * ?") //每天十天执行一次
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
// selectHasPrice();
|
||||
// selectSafeStorageAndDeliverOneYear();
|
||||
selectHasPrice();
|
||||
selectSafeStorageAndDeliverOneYear();
|
||||
// bdgzsomthingService.selectds();
|
||||
}
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
|
@ -49,6 +49,7 @@ public class BgMasterLineController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建过程检报工")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:create')")
|
||||
@ -73,6 +74,8 @@ public class BgMasterLineController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@ -81,7 +84,13 @@ public class BgMasterLineController {
|
||||
BgMasterLineDO bgMasterLine = bgMasterLineService.getBgMasterLine(id);
|
||||
return success(BeanUtils.toBean(bgMasterLine, BgMasterLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/validExceed")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
public CommonResult<Boolean> validExceed(@RequestParam("id") Long id,@RequestParam("amount") Integer amount) {
|
||||
return success(bgMasterLineService.validExceed(id,amount));
|
||||
}
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得过程检报工分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
|
@ -38,6 +38,15 @@ public class BgMasterLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工时")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private BigDecimal[] workTime;
|
||||
|
||||
private BigDecimal[] workTime;
|
||||
private String userName;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.bgmasterline.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -53,5 +54,13 @@ public class BgMasterLineRespVO {
|
||||
@Schema(description = "报工人")
|
||||
@ExcelProperty("报工人")
|
||||
private String userName;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
private List<String> fileUrlList;
|
||||
}
|
@ -20,7 +20,7 @@ public class BgMasterLineSaveReqVO {
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "过程检明细id", example = "10005")
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
@ -34,4 +34,14 @@ public class BgMasterLineSaveReqVO {
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer type;
|
||||
private String userName;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
@ -51,5 +51,14 @@ public class FpUserDetailRespVO {
|
||||
@Schema(description = "主表备注", example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
private String remarks;
|
||||
@Schema(description = "工序id")
|
||||
private Long procedureId;
|
||||
@Schema(description = "工序编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "工序名称")
|
||||
private String procedureName;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,10 @@ public class UserVo {
|
||||
private Long busyId;
|
||||
@Schema(description = "岗位ID", example = "12927")
|
||||
private String postId;
|
||||
@Schema(description = "工序id")
|
||||
private Long procedureId;
|
||||
@Schema(description = "是否负责人")
|
||||
private String isRes;
|
||||
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class InvoiceController {
|
||||
@OperateLog(enable = false)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult operate(@Valid @RequestBody InvoiceSaveReqVO operateReqVO) {
|
||||
return success(invoiceService.operate(operateReqVO));
|
||||
return invoiceService.operate(operateReqVO);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ -115,4 +115,11 @@ public class InvoiceController {
|
||||
List<InvoiceDO> invoice = invoiceService.getOrderYfInvoice(code);
|
||||
return success(invoice);
|
||||
}
|
||||
@GetMapping("/pages")
|
||||
@Operation(summary = "获得财务发票分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
|
||||
public CommonResult<PageResult<InvoiceRespVO>> getInvoicePages(@Valid InvoicePageReqVO pageReqVO) {
|
||||
PageResult<InvoiceDO> pageResult = invoiceService.getInvoicePages(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, InvoiceRespVO.class));
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_Y
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class InvoicePageReqVO extends PageParam {
|
||||
@Schema(description = "id", example = "30302")
|
||||
private Long Id;
|
||||
|
||||
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", example = "2")
|
||||
private String businessType;
|
||||
@ -64,5 +66,5 @@ public class InvoicePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "订单编号", example = "30302")
|
||||
private String orderCode;
|
||||
|
||||
private Long cgOrderIdId;
|
||||
}
|
||||
|
@ -87,4 +87,6 @@ public class InvoiceRespVO {
|
||||
|
||||
@Schema(description = "订单编号")
|
||||
private String orderCode;
|
||||
@Schema(description = "订单编号")
|
||||
private Long cgOrderIdId;
|
||||
}
|
||||
|
@ -71,5 +71,5 @@ public class InvoiceSaveReqVO {
|
||||
|
||||
@Schema(description = "操作意见")
|
||||
private String activeOpinion;
|
||||
|
||||
private Long cgOrderIdId;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.master;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline.MasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -14,6 +15,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -71,21 +73,21 @@ public class MasterController {
|
||||
@Operation(summary = "获得借用主")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<MasterRespVO> getMaster(@RequestParam("id") Integer id) {
|
||||
public CommonResult<MasterDO> getMaster(@RequestParam("id") Integer id) {
|
||||
MasterDO master = masterService.getMaster(id);
|
||||
MaterialDO material = materialService.getMaterial(Long.valueOf(master.getJyMaster()));
|
||||
if (ObjectUtil.isNotEmpty( material)){
|
||||
master.setJyMasterName(material.getName());
|
||||
}
|
||||
return success(BeanUtils.toBean(master, MasterRespVO.class));
|
||||
// MaterialDO material = materialService.getMaterial(Long.valueOf(master.getJyMaster()));
|
||||
// if (ObjectUtil.isNotEmpty( material)){
|
||||
// master.setJyMasterName(material.getName());
|
||||
// }
|
||||
return success(master);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得借用主分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<PageResult<MasterRespVO>> getMasterPage(@Valid MasterPageReqVO pageReqVO) {
|
||||
public CommonResult<PageResult<MasterDO>> getMasterPage(@Valid MasterPageReqVO pageReqVO) {
|
||||
PageResult<MasterDO> pageResult = masterService.getMasterPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MasterRespVO.class));
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ -100,5 +102,31 @@ public class MasterController {
|
||||
ExcelUtils.write(response, "借用主.xls", "数据", MasterRespVO.class,
|
||||
BeanUtils.toBean(list, MasterRespVO.class));
|
||||
}
|
||||
@GetMapping("/getMasterLinePage")
|
||||
@Operation(summary = "获得借用主分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master:query')")
|
||||
public CommonResult<PageResult<MasterLineDO>> getMasterLinePage(@Valid MasterPageReqVO pageReqVO) {
|
||||
PageResult<MasterLineDO> pageResult = masterService.getMasterLinePage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/exportMasterLine")
|
||||
@Operation(summary = "导出员工物料报表")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportMasterLine(@Valid MasterPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MasterLineDO> list = masterService.getMasterLinePage(pageReqVO).getList();
|
||||
list.forEach(item -> {
|
||||
if ("1".equals(item.getJyTypes())) {
|
||||
item.setQuantityLent(new BigDecimal(item.getJyNum()));
|
||||
} else {
|
||||
if (ObjectUtil.isNotEmpty(item.getJyNum())){
|
||||
item.setQuantityLent(new BigDecimal(item.getJyNum()).negate());
|
||||
}
|
||||
}
|
||||
}); // 导出 Excel
|
||||
ExcelUtils.write(response, "员工借用物料报表.xlsx", "数据", MasterRespVO.class,
|
||||
BeanUtils.toBean(list, MasterRespVO.class));
|
||||
}
|
||||
}
|
@ -1,6 +1,9 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.master.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.TimestampToDateConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -14,55 +17,60 @@ import com.alibaba.excel.annotation.*;
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MasterRespVO {
|
||||
@Schema(description = "责任人")
|
||||
@ExcelProperty("责任人")
|
||||
private String jyUsers;
|
||||
@Schema(description = "部门")
|
||||
@ExcelProperty("部门")
|
||||
private String jyBms;
|
||||
@Schema(description = "借用日期")
|
||||
@ExcelProperty(value = "日期", converter = TimestampToDateConvert.class)
|
||||
private LocalDateTime jyDate;
|
||||
|
||||
@Schema(description = "类型", example = "1")
|
||||
@ExcelProperty(value = "类型", converter = DictConvert.class)
|
||||
@DictFormat("heli_borrow_type")
|
||||
private String jyTypes;
|
||||
@Schema(description = "用途")
|
||||
@ExcelProperty(value = "用途", converter = DictConvert.class)
|
||||
@DictFormat("heli_use")
|
||||
private String jyYt;
|
||||
@Schema(description = "物料名称")
|
||||
@ExcelProperty("物料名称")
|
||||
private String jyMasters;
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal jyNum;
|
||||
@Schema(description = "数量")
|
||||
// @ExcelProperty("数量")
|
||||
private BigDecimal num;
|
||||
@Schema(description = "借出数量")
|
||||
@ExcelProperty("借出数量")
|
||||
private BigDecimal quantityLent;
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rems;
|
||||
@Schema(description = "备注")
|
||||
// @ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31322")
|
||||
@ExcelProperty("主键")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "借用部门")
|
||||
@ExcelProperty("借用部门")
|
||||
private Integer jyBm;
|
||||
|
||||
@Schema(description = "借用用途")
|
||||
@ExcelProperty("借用用途")
|
||||
private String jyYt;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "借用物料名称")
|
||||
@ExcelProperty("借用物料名称")
|
||||
private Integer jyMaster;
|
||||
private String jyMaster;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
@ExcelProperty("借用人")
|
||||
private Long jyUser;
|
||||
|
||||
@Schema(description = "借用类型", example = "1")
|
||||
@ExcelProperty("借用类型")
|
||||
private String jyType;
|
||||
|
||||
@Schema(description = "数量")
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal num;
|
||||
@Schema(description = "借用日期")
|
||||
@ExcelProperty("借用日期")
|
||||
private LocalDateTime jyDate;
|
||||
|
||||
@Schema(description = "借用人")
|
||||
@ExcelProperty("借用人")
|
||||
private String jyUsers;
|
||||
@Schema(description = "借用部门")
|
||||
@ExcelProperty("借用部门")
|
||||
private String jyBms;
|
||||
@Schema(description = "借用物料名称")
|
||||
@ExcelProperty("借用物料名称")
|
||||
private String jyMasters;
|
||||
@Schema(description = "借用物料名称")
|
||||
private String jyMasterName;
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.master.vo;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline.MasterLineDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@ -38,6 +40,8 @@ public class MasterSaveReqVO {
|
||||
private BigDecimal num;
|
||||
@Schema(description = "借用时间")
|
||||
private LocalDateTime jyDate;
|
||||
@Schema(description = "借用物料明细")
|
||||
private List<MasterLineDO> jyDetails;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.masterline;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.masterline.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline.MasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.masterline.MasterLineService;
|
||||
|
||||
@Tag(name = "管理后台 - 借用行")
|
||||
@RestController
|
||||
@RequestMapping("/heli/master-line")
|
||||
@Validated
|
||||
public class MasterLineController {
|
||||
|
||||
@Resource
|
||||
private MasterLineService masterLineService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建借用行")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:create')")
|
||||
public CommonResult<Integer> createMasterLine(@Valid @RequestBody MasterLineSaveReqVO createReqVO) {
|
||||
return success(masterLineService.createMasterLine(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新借用行")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:update')")
|
||||
public CommonResult<Boolean> updateMasterLine(@Valid @RequestBody MasterLineSaveReqVO updateReqVO) {
|
||||
masterLineService.updateMasterLine(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除借用行")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:delete')")
|
||||
public CommonResult<Boolean> deleteMasterLine(@RequestParam("id") Integer id) {
|
||||
masterLineService.deleteMasterLine(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得借用行")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:query')")
|
||||
public CommonResult<MasterLineRespVO> getMasterLine(@RequestParam("id") Integer id) {
|
||||
MasterLineDO masterLine = masterLineService.getMasterLine(id);
|
||||
return success(BeanUtils.toBean(masterLine, MasterLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得借用行分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:query')")
|
||||
public CommonResult<PageResult<MasterLineRespVO>> getMasterLinePage(@Valid MasterLinePageReqVO pageReqVO) {
|
||||
PageResult<MasterLineDO> pageResult = masterLineService.getMasterLinePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MasterLineRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出借用行 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportMasterLineExcel(@Valid MasterLinePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MasterLineDO> list = masterLineService.getMasterLinePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "借用行.xls", "数据", MasterLineRespVO.class,
|
||||
BeanUtils.toBean(list, MasterLineRespVO.class));
|
||||
}
|
||||
@GetMapping("/getByMasterId")
|
||||
@Operation(summary = "获得借用行")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:master-line:query')")
|
||||
public CommonResult<List<MasterLineDO>> getByMasterId(@RequestParam("id") Integer id) {
|
||||
List<MasterLineDO> list = masterLineService.getByMasterId(id);
|
||||
return success(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.masterline.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 借用行分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class MasterLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "借用id", example = "2559")
|
||||
private Integer jyId;
|
||||
|
||||
@Schema(description = "借用物料")
|
||||
private String jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
private String jyNum;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "物料id", example = "22466")
|
||||
private Long matId;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.masterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 借用行 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MasterLineRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25113")
|
||||
@ExcelProperty("主键")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "借用id", example = "2559")
|
||||
@ExcelProperty("借用id")
|
||||
private Integer jyId;
|
||||
|
||||
@Schema(description = "借用物料")
|
||||
@ExcelProperty("借用物料")
|
||||
private String jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
@ExcelProperty("借用数量")
|
||||
private String jyNum;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "物料id", example = "22466")
|
||||
@ExcelProperty("物料id")
|
||||
private Long matId;
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.masterline.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 借用行新增/修改 Request VO")
|
||||
@Data
|
||||
public class MasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "25113")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "借用id", example = "2559")
|
||||
private Integer jyId;
|
||||
|
||||
@Schema(description = "借用物料")
|
||||
private String jyMaster;
|
||||
|
||||
@Schema(description = "借用数量")
|
||||
private String jyNum;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rem;
|
||||
|
||||
@Schema(description = "物料id", example = "22466")
|
||||
private Long matId;
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.material;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
@ -16,6 +18,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageinventory.StorageInventoryDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@ -44,11 +47,16 @@ public class MaterialController {
|
||||
|
||||
@Resource
|
||||
private MaterialService materialService;
|
||||
@Resource
|
||||
private MaterialMapper materialMapper;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material:create')")
|
||||
public CommonResult<Long> createMaterial(@Valid @RequestBody MaterialSaveReqVO createReqVO) {
|
||||
if (ObjectUtil.isNotEmpty(materialService.getMaterialId(createReqVO.getCode()))){
|
||||
return CommonResult.error(400,"物料编码"+createReqVO.getCode()+"已存在");
|
||||
}
|
||||
return success(materialService.createMaterial(createReqVO));
|
||||
}
|
||||
|
||||
@ -56,6 +64,12 @@ public class MaterialController {
|
||||
@Operation(summary = "更新物料")
|
||||
@PreAuthorize("@ss.hasPermission('heli:material:update')")
|
||||
public CommonResult<Boolean> updateMaterial(@Valid @RequestBody MaterialSaveReqVO updateReqVO) {
|
||||
LambdaQueryWrapper<MaterialDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaterialDO::getCode, updateReqVO.getCode());
|
||||
queryWrapper.ne(MaterialDO::getId, updateReqVO.getId());
|
||||
if (ObjectUtil.isNotEmpty(materialMapper.selectOne(queryWrapper))){
|
||||
return CommonResult.error(400,"物料编码"+updateReqVO.getCode()+"已存在");
|
||||
}
|
||||
materialService.updateMaterial(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
@ -141,7 +155,13 @@ public class MaterialController {
|
||||
PageResult<MaterialDO> pageResult = materialService.getStorageNowPageGroupMaterial(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/page-material-group-no")
|
||||
@Operation(summary = "根据采购单获得入库物料列表")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
|
||||
public CommonResult<PageResult<MaterialDO>> getStorageNowMaterialNoPage(@Valid StorageLogPageReqVO pageReqVO) {
|
||||
PageResult<MaterialDO> pageResult = materialService.getStorageNowMaterialNoPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
@GetMapping("/page-now-all")
|
||||
@Operation(summary = "获得出库物料列表")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
|
||||
|
@ -75,5 +75,7 @@ public class MaterialPlanPageReqVO extends PageParam {
|
||||
private Integer mplanStatus;
|
||||
@Schema(description = "责任人")
|
||||
private String duEmpName;
|
||||
@Schema(description = "责任人")
|
||||
private String blueprintNo;
|
||||
|
||||
}
|
@ -21,8 +21,7 @@ import java.util.Date;
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false) // 设置 chain = false,避免BOM导入有问题
|
||||
public class PartExcelVO {
|
||||
@ExcelProperty("工序名称")
|
||||
private String procedureName;
|
||||
|
||||
|
||||
|
||||
@ExcelProperty("项目名称")
|
||||
@ -30,11 +29,14 @@ public class PartExcelVO {
|
||||
|
||||
@ExcelProperty("子项目名称")
|
||||
private String projectSubName;
|
||||
@ExcelProperty("客户简码")
|
||||
private String customerName;
|
||||
@ExcelProperty("零件号")
|
||||
private String blueprintNo;
|
||||
// @ExcelProperty("客户简码")
|
||||
// private String customerName;
|
||||
@ExcelProperty("零件名称")
|
||||
private String materialName;
|
||||
|
||||
@ExcelProperty("工序名称")
|
||||
private String procedureName;
|
||||
@ExcelProperty("材质")
|
||||
private String compositionName;
|
||||
|
||||
|
@ -11,6 +11,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -87,8 +88,43 @@ public class OrderYfController {
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OrderYfDO> list = orderYfService.getOrderYfPage(pageReqVO).getList();
|
||||
for (OrderYfDO order : list) {
|
||||
BigDecimal cgYifu = order.getCgYifu();
|
||||
BigDecimal cgYf = order.getCgYf();
|
||||
|
||||
// 快速失败检查:任一为null或分母为0
|
||||
if (cgYifu == null || cgYf == null || cgYf.signum() == 0) {
|
||||
order.setYfRatio("0%");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 使用double直接计算避免BigDecimal开销
|
||||
double numerator = cgYifu.doubleValue();
|
||||
double denominator = cgYf.doubleValue();
|
||||
|
||||
// 直接计算百分比并四舍五入取整
|
||||
int percent = (int) Math.round((numerator / denominator) * 100);
|
||||
order.setYfRatio(percent + "%");
|
||||
|
||||
BigDecimal amount = order.getAmount();
|
||||
|
||||
// 快速失败检查:任一为null或分母为0
|
||||
if (amount == null || cgYf == null || cgYf.signum() == 0) {
|
||||
order.setYkRatio("0%");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 使用double直接计算避免BigDecimal开销
|
||||
double numerator1 = amount.doubleValue();
|
||||
double denominator1 = cgYf.doubleValue();
|
||||
|
||||
// 直接计算百分比并四舍五入取整
|
||||
int percent1 = (int) Math.round((numerator1 / denominator1) * 100);
|
||||
order.setYkRatio(percent1 + "%");
|
||||
|
||||
}
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "应付记录.xls", "数据", OrderYfRespVO.class,
|
||||
ExcelUtils.write(response, "应付记录.xlsx", "数据", OrderYfRespVO.class,
|
||||
BeanUtils.toBean(list, OrderYfRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -39,17 +41,27 @@ public class OrderYfRespVO {
|
||||
@Schema(description = "已付金额")
|
||||
@ExcelProperty("已付金额(元)")
|
||||
private BigDecimal cgYifu;
|
||||
@Schema(description = "已付款比例")
|
||||
@ExcelProperty("已付款比例")
|
||||
private String yfRatio;
|
||||
@Schema(description = "已开票金额")
|
||||
@ExcelProperty("已开票金额(元)")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "已开票比例")
|
||||
@ExcelProperty("已开票比例")
|
||||
private String ykRatio;
|
||||
@Schema(description = "付款状态")
|
||||
@ExcelProperty("付款状态")
|
||||
@ExcelProperty(value = "付款状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_yingfu_money")
|
||||
private Integer cgTypee;
|
||||
|
||||
@Schema(description = "订单状态")
|
||||
@ExcelProperty(value = "订单状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_purchase_receiving_status")
|
||||
private Integer receivingStatus;
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
||||
private Long projectId;
|
||||
private String projectCode;
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.orderys;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -11,6 +12,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -86,8 +88,43 @@ public class OrderYsController {
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OrderYsDO> list = orderYsService.getOrderYsPage(pageReqVO).getList();
|
||||
for (OrderYsDO order : list) {
|
||||
BigDecimal yishou = order.getCgYishou();
|
||||
BigDecimal cgYs = order.getCgYs();
|
||||
|
||||
// 快速失败检查:任一为null或分母为0
|
||||
if (yishou == null || cgYs == null || cgYs.signum() == 0) {
|
||||
order.setYsRatio("0%");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 使用double直接计算避免BigDecimal开销
|
||||
double numerator = yishou.doubleValue();
|
||||
double denominator = cgYs.doubleValue();
|
||||
|
||||
// 直接计算百分比并四舍五入取整
|
||||
int percent = (int) Math.round((numerator / denominator) * 100);
|
||||
order.setYsRatio(percent + "%");
|
||||
|
||||
BigDecimal amount = order.getAmount();
|
||||
|
||||
// 快速失败检查:任一为null或分母为0
|
||||
if (amount == null || cgYs == null || cgYs.signum() == 0) {
|
||||
order.setYkRatio("0%");
|
||||
continue;
|
||||
}
|
||||
|
||||
// 使用double直接计算避免BigDecimal开销
|
||||
double numerator1 = amount.doubleValue();
|
||||
double denominator1 = cgYs.doubleValue();
|
||||
|
||||
// 直接计算百分比并四舍五入取整
|
||||
int percent1 = (int) Math.round((numerator1 / denominator1) * 100);
|
||||
order.setYkRatio(percent1 + "%");
|
||||
|
||||
}
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "应收记录.xls", "数据", OrderYsExportVO.class,
|
||||
ExcelUtils.write(response, "应收记录.xlsx", "数据", OrderYsExportVO.class,
|
||||
BeanUtils.toBean(list, OrderYsExportVO.class));
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,22 @@ public class OrderYsExportVO {
|
||||
@Schema(description = "已收金额")
|
||||
@ExcelProperty("已收金额")
|
||||
private BigDecimal cgYishou;
|
||||
@Schema(description = "已收款比例")
|
||||
@ExcelProperty("已收款比例")
|
||||
private String ysRatio;
|
||||
@Schema(description = "已开票金额")
|
||||
@ExcelProperty("已开票金额")
|
||||
private BigDecimal amount;
|
||||
@Schema(description = "已开票比例")
|
||||
@ExcelProperty("已开票比例")
|
||||
private String ykRatio;
|
||||
@Schema(description = "回款状态")
|
||||
@ExcelProperty(value = "回款状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_yingfu_money")
|
||||
private Integer cgTypee;
|
||||
@ExcelProperty(value = "发货状态", converter = DictConvert.class)
|
||||
@DictFormat("heli_delivery_status")
|
||||
private Integer deliveryStatus;
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String rem;
|
||||
|
@ -68,5 +68,7 @@ public class OrderYsRespVO {
|
||||
private BigDecimal fourFuKuan;
|
||||
private BigDecimal fiveFuKuan;
|
||||
private BigDecimal sixFuKuan;
|
||||
|
||||
private Integer deliveryStatus;
|
||||
private Long projectId;
|
||||
private String projectCode;
|
||||
}
|
@ -62,7 +62,7 @@ public class PgMasterController {
|
||||
@PostMapping("/zfPgMaster")
|
||||
@Operation(summary = "作废过程检验派工单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:pg-master:create')")
|
||||
public CommonResult<Integer> zfPgMaster(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Integer> zfPgMaster(@RequestParam("id") Long id) {
|
||||
return success(pgMasterService.zfPgMaster(id));
|
||||
}
|
||||
|
||||
@ -104,6 +104,7 @@ public class PgMasterController {
|
||||
@PreAuthorize("@ss.hasPermission('heli:pg-master:query')")
|
||||
public CommonResult<PageResult<PgMasterRespVO>> getPgMasterPage(@Valid PgMasterPageReqVO pageReqVO) {
|
||||
PageResult<PgMasterDO> pageResult = pgMasterService.getPgMasterPage(pageReqVO);
|
||||
|
||||
return success(BeanUtils.toBean(pageResult, PgMasterRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -118,6 +118,7 @@ public class PgMasterLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "报工状态")
|
||||
private String active;
|
||||
|
||||
@Schema(description = "项目或子项目id")
|
||||
private String subOrDetailName;
|
||||
|
||||
}
|
@ -15,11 +15,13 @@ import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFramewor
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo.PlanTaskPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo.PlanTaskRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
||||
@ -247,8 +249,6 @@ public class ProcessBomController {
|
||||
PageResult<ProcessBomDetailDO> pageResult = processBomService.getStandardPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/submit")
|
||||
@Operation(summary = "提交")
|
||||
@PreAuthorize("@ss.hasPermission('heli:process-bom:create')")
|
||||
@ -273,4 +273,16 @@ public class ProcessBomController {
|
||||
ExcelUtils.write(response, "标准件物料需求计划.xlsx", "数据", ProcessBomExcelVO.class,
|
||||
BeanUtils.toBean(list, ProcessBomExcelVO.class));
|
||||
}
|
||||
@GetMapping("/planBbPage")
|
||||
@Operation(summary = "获得加工件生产进度分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||
public CommonResult<PageResult<ProcessBomDetailDO>> planBbPage(@Valid TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
|
||||
return success(processBomService.planBbPage(pageReqVO));
|
||||
}
|
||||
@GetMapping("/planBZJPage")
|
||||
@Operation(summary = "获得生产进度分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
|
||||
public CommonResult<PageResult<ProcessBomDetailDO>> planBZJPage(@Valid TaskPlanJDBaoBiaoPageReqVO pageReqVO) {
|
||||
return success(processBomService.planBZJPage(pageReqVO));
|
||||
}
|
||||
}
|
||||
|
@ -142,5 +142,10 @@ public class ProcessDesignRespVO {
|
||||
private String reReason;
|
||||
@Schema(description = "返工日期")
|
||||
private LocalDateTime reTime;
|
||||
|
||||
private String blankDeferred;
|
||||
private String deferred3d;
|
||||
private String deferred2d;
|
||||
private String blankDelayReason;
|
||||
private String delayReason2d;
|
||||
private String delayReason3d;
|
||||
}
|
||||
|
@ -18,10 +18,12 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrd
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.orderys.OrderYsMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.manager.CrossOrderManager;
|
||||
import com.chanko.yunxi.mes.module.heli.service.deliverorder.DeliverOrderService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.orderys.OrderYsService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.processbom.ProcessBomService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.projectorder.ProjectOrderService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.purchaseorder.PurchaseOrderService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storage.StorageService;
|
||||
@ -66,13 +68,9 @@ public class ProjectOrderController {
|
||||
@Resource
|
||||
private OrderYsService orderYsService;
|
||||
@Resource
|
||||
private ProcessBomService processBomService;
|
||||
@Resource
|
||||
private DeliverOrderService deliverOrderService;
|
||||
@Resource
|
||||
private TaskDispatchService taskDispatchService;
|
||||
@Resource
|
||||
private StorageService storageService;
|
||||
@Resource
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建项目订单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:project-order:create')")
|
||||
@ -155,6 +153,27 @@ public class ProjectOrderController {
|
||||
public CommonResult<PageResult<ProjectOrderCostRespVO>> getProjectOrderCostPage(@Valid ProjectOrderCostPageReqVO pageReqVO) {
|
||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderCostPage(pageReqVO);
|
||||
for (ProjectOrderDO projectOrderDO :pageResult.getList()) {
|
||||
//标准件成本
|
||||
BigDecimal standardPartsCost;
|
||||
standardPartsCost=processBomService.StandardPartsCost(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
projectOrderDO.setBiaoZhunJianCost(standardPartsCost);
|
||||
//材料成本
|
||||
BigDecimal materialCost;
|
||||
materialCost=processBomService.materialCost(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
projectOrderDO.setCailiaoCost(materialCost);
|
||||
|
||||
//外协加工费
|
||||
BigDecimal outsourcedProcessingFee;
|
||||
outsourcedProcessingFee=processBomService.outsourcedProcessingFee(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
projectOrderDO.setWaixeiCost(outsourcedProcessingFee);
|
||||
|
||||
//内部工时费
|
||||
BigDecimal internalLaborCost;
|
||||
internalLaborCost=processBomService.internalLaborCost(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
projectOrderDO.setNeibuCost(internalLaborCost);
|
||||
|
||||
|
||||
//运费成本
|
||||
List<DeliverOrderDO> deliverOrderDO = deliverOrderService.getListYf(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
if (deliverOrderDO!=null&&deliverOrderDO.size()>0){
|
||||
BigDecimal totalAmount = deliverOrderDO.stream()
|
||||
@ -164,34 +183,26 @@ public class ProjectOrderController {
|
||||
}else {
|
||||
projectOrderDO.setYunFeiCost(BigDecimal.ZERO);
|
||||
}
|
||||
List<TaskDispatchDO> list= taskDispatchService.getListJg(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
if (list!=null&&list.size()>0){
|
||||
BigDecimal totalAmount = list.stream()
|
||||
.map(TaskDispatchDO -> TaskDispatchDO.getZanGuMoney() != null ?new BigDecimal(TaskDispatchDO.getZanGuMoney()) : BigDecimal.ZERO)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
projectOrderDO.setJiaGongShiCost(totalAmount);
|
||||
}else {
|
||||
projectOrderDO.setJiaGongShiCost(BigDecimal.ZERO);
|
||||
}
|
||||
List<StorageDO> list1= storageService.getList(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
if (list1!=null&&list1.size()>0){
|
||||
BigDecimal totalAmount = list1.stream()
|
||||
.map(StorageDO -> StorageDO.getCaiGouMoney() != null ?StorageDO.getCaiGouMoney() : BigDecimal.ZERO)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
projectOrderDO.setBiaoZhunJianCost(totalAmount);
|
||||
}else {
|
||||
projectOrderDO.setBiaoZhunJianCost(BigDecimal.ZERO);
|
||||
}
|
||||
List<PurchaseOrderDO> list2 =purchaseOrderService.getListqt(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
if (list2!=null&&list2.size()>0){
|
||||
BigDecimal totalAmount = list2.stream()
|
||||
.map(PurchaseOrderDO -> PurchaseOrderDO.getCaiGouMoney() != null ?PurchaseOrderDO.getCaiGouMoney() : BigDecimal.ZERO)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
projectOrderDO.setQitaCost(totalAmount);
|
||||
}else {
|
||||
projectOrderDO.setQitaCost(BigDecimal.ZERO);
|
||||
}
|
||||
BigDecimal sum = projectOrderDO.getYunFeiCost().add(projectOrderDO.getJiaGongShiCost()).add(projectOrderDO.getBiaoZhunJianCost()).add(projectOrderDO.getQitaCost());
|
||||
// List<TaskDispatchDO> list= taskDispatchService.getListJg(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
// if (list!=null&&list.size()>0){
|
||||
// BigDecimal totalAmount = list.stream()
|
||||
// .map(TaskDispatchDO -> TaskDispatchDO.getZanGuMoney() != null ?new BigDecimal(TaskDispatchDO.getZanGuMoney()) : BigDecimal.ZERO)
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// projectOrderDO.setJiaGongShiCost(totalAmount);
|
||||
// }else {
|
||||
// projectOrderDO.setJiaGongShiCost(BigDecimal.ZERO);
|
||||
// }
|
||||
|
||||
// List<PurchaseOrderDO> list2 =purchaseOrderService.getListqt(projectOrderDO.getId(),projectOrderDO.getProjectSubId());
|
||||
// if (list2!=null&&list2.size()>0){
|
||||
// BigDecimal totalAmount = list2.stream()
|
||||
// .map(PurchaseOrderDO -> PurchaseOrderDO.getCaiGouMoney() != null ?PurchaseOrderDO.getCaiGouMoney() : BigDecimal.ZERO)
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// projectOrderDO.setQitaCost(totalAmount);
|
||||
// }else {
|
||||
// projectOrderDO.setQitaCost(BigDecimal.ZERO);
|
||||
// }
|
||||
BigDecimal sum = projectOrderDO.getYunFeiCost().add(projectOrderDO.getCailiaoCost()).add(projectOrderDO.getBiaoZhunJianCost()).add(projectOrderDO.getNeibuCost()).add(projectOrderDO.getWaixeiCost());
|
||||
projectOrderDO.setSumCost(sum);
|
||||
}
|
||||
return success(BeanUtils.toBean(pageResult, ProjectOrderCostRespVO.class));
|
||||
|
@ -57,11 +57,11 @@ public class ProjectOrderCostRespVO {
|
||||
|
||||
@Schema(description = "外协加工费用")
|
||||
@ExcelProperty("外协加工费用")
|
||||
private BigDecimal waiXieCost;
|
||||
private BigDecimal waixeiCost;
|
||||
|
||||
@Schema(description = "加工工时换算成本")
|
||||
@ExcelProperty("加工工时换算成本")
|
||||
private BigDecimal jiaGongShiCost;
|
||||
@Schema(description = "内部加工成本")
|
||||
@ExcelProperty("内部加工成本")
|
||||
private BigDecimal neibuCost;
|
||||
@Schema(description = "运费成本")
|
||||
@ExcelProperty("运费成本")
|
||||
private BigDecimal yunFeiCost;
|
||||
@ -69,6 +69,8 @@ public class ProjectOrderCostRespVO {
|
||||
@ExcelProperty("合计成本")
|
||||
private BigDecimal sumCost;
|
||||
@ExcelProperty("其他成本")
|
||||
private BigDecimal qitaCost;
|
||||
|
||||
private BigDecimal cailiaoCost;
|
||||
@Schema(description = "设备型号", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("设备型号")
|
||||
private String deviceModel;
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ public class PurchaseOrderNoController {
|
||||
@Operation(summary = "更新采购订单主")
|
||||
@PreAuthorize("@ss.hasPermission('project:purchase-order-no:update')")
|
||||
public CommonResult<Boolean> updatePurchaseOrderNo(@Valid @RequestBody PurchaseOrderNoSaveReqVO updateReqVO) {
|
||||
purchaseOrderNoService.updatePurchaseOrderNo(updateReqVO);
|
||||
return success(true);
|
||||
|
||||
return purchaseOrderNoService.updatePurchaseOrderNo(updateReqVO);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ -158,5 +158,10 @@ public class PurchaseOrderNoController {
|
||||
public CommonResult<Boolean> deleteForm(@RequestParam("id") Long id) {
|
||||
return purchaseOrderNoService.deleteForm(id);
|
||||
}
|
||||
|
||||
@GetMapping("/updateIsPrint")
|
||||
@Operation(summary = "打印")
|
||||
@PreAuthorize("@ss.hasPermission('heli:process-bom:create')")
|
||||
public CommonResult<Boolean> updateIsPrint(@RequestParam("id") Long id) {
|
||||
return purchaseOrderNoService.updateIsPrint(id);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderno.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.TimestampToDateConvert;
|
||||
@ -109,4 +110,6 @@ public class PurchaseOrderNoRespVO {
|
||||
private String isPrint;
|
||||
@Schema(description = "收货状态")
|
||||
private Integer receivingStatus1;
|
||||
@Schema(description = "创建人")
|
||||
private String submitUserName;
|
||||
}
|
@ -5,18 +5,23 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.outsourcestockboom.vo.OutsourceStockBoomSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageinventory.StorageInventoryDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno.PurchaseOrderNoMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageinventory.StorageInventoryMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -71,6 +76,10 @@ public class StorageController {
|
||||
private MaterialMapper materialMapper;
|
||||
@Resource
|
||||
private StorageInventoryMapper storageInventoryMapper;
|
||||
@Resource
|
||||
private PurchaseOrderNoDetailMapper purchaseOrderNoDetailMapper;
|
||||
@Resource
|
||||
private PurchaseOrderNoMapper purchaseOrderNoMapper;
|
||||
@PostMapping("/cancelWeiWai")
|
||||
@Operation(summary = "委外取消提交")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage:create')")
|
||||
@ -118,6 +127,7 @@ public class StorageController {
|
||||
}
|
||||
@PutMapping("/update-status")
|
||||
@Operation(summary = "更新入/出库")
|
||||
@Transactional
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage:update')")
|
||||
public CommonResult<Boolean> updateStorageStatus(@Valid @RequestBody StorageSaveReqVO updateReqVO) {
|
||||
|
||||
@ -182,6 +192,11 @@ public class StorageController {
|
||||
storageInventoryDO.setYardAmount(totalNumber);
|
||||
}
|
||||
storageInventoryMapper.insertOrUpdate(storageInventoryDO);
|
||||
PurchaseOrderNoDetailDO purchaseOrderNoDetailDO = purchaseOrderNoDetailMapper.selectById(storageMatDO.getPurchaseOrderNoDetailId());
|
||||
if (ObjectUtil.isNotEmpty(purchaseOrderNoDetailDO)){
|
||||
purchaseOrderNoDetailDO.setPurchaseRemAmount(purchaseOrderNoDetailDO.getPurchaseRemAmount().subtract(storageMatDO.getStorageOkQty()));
|
||||
purchaseOrderNoDetailMapper.updateById(purchaseOrderNoDetailDO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if (updateReqVO.getStockType()==2){
|
||||
@ -195,6 +210,7 @@ public class StorageController {
|
||||
wrapper.eq(StorageInventoryDO::getDeleted,0);
|
||||
StorageInventoryDO storageInventoryDO = storageInventoryMapper.selectOne(wrapper);
|
||||
if (ObjectUtil.isNotEmpty(storageInventoryDO)){
|
||||
if (storageInventoryDO.getYardAmount().compareTo(storageMatDO.getStorageOkQty()) < 0) CommonResult.error(400,"库存数量不足,请确认");
|
||||
storageInventoryDO.setYardAmount(storageInventoryDO.getYardAmount().subtract(storageMatDO.getStorageOkQty()));
|
||||
}
|
||||
storageInventoryMapper.insertOrUpdate(storageInventoryDO);
|
||||
@ -282,6 +298,14 @@ public class StorageController {
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage:query')")
|
||||
public CommonResult<StorageRespVO> getStorage(@RequestParam("id") Long id) {
|
||||
StorageDO storage = storageService.getStorage(id);
|
||||
if (storage.getStockType()==1&&storage.getStockInType()==1){
|
||||
LambdaQueryWrapper<PurchaseOrderNoDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PurchaseOrderNoDO::getPurchaseNo,storage.getHeaderNo());
|
||||
PurchaseOrderNoDO purchaseOrderNoDO = purchaseOrderNoMapper.selectOne(wrapper);
|
||||
if (ObjectUtil.isNotEmpty(purchaseOrderNoDO)){
|
||||
storage.setHeaderId(purchaseOrderNoDO.getId());
|
||||
}
|
||||
}
|
||||
return success(BeanUtils.toBean(storage, StorageRespVO.class));
|
||||
}
|
||||
|
||||
|
@ -107,5 +107,7 @@ public class StorageRespVO {
|
||||
@Schema(description = "子项目id")
|
||||
@ExcelProperty("子项目id")
|
||||
private Integer projectNo;
|
||||
@Schema(description = "上游单号id")
|
||||
private Long headerId;
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo.StorageMatSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@ -82,4 +83,6 @@ public class StorageSaveReqVO {
|
||||
private Long rgId;
|
||||
@Schema(description = "库位id")
|
||||
private Long pnId;
|
||||
private List<StorageMatSaveReqVO> matItemDOList;
|
||||
|
||||
}
|
||||
|
@ -113,4 +113,12 @@ public class StorageInController {
|
||||
public CommonResult<Boolean> warehousing(@RequestParam("id") Long id) {
|
||||
return storageInService.warehousing(id);
|
||||
}
|
||||
@GetMapping("/updateIsPrint")
|
||||
@Operation(summary = "修改打印状态")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
|
||||
public CommonResult<Boolean> updateIsPrint(@RequestParam("id") Long id) {
|
||||
return success(storageInService.updateIsPrint(id));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storageinventory;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageNowAllReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageinventory.StorageInventoryMapper;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -40,6 +42,8 @@ public class StorageInventoryController {
|
||||
|
||||
@Resource
|
||||
private StorageInventoryService storageInventoryService;
|
||||
@Resource
|
||||
private StorageInventoryMapper storageInventoryMapper;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建库存")
|
||||
@ -130,4 +134,16 @@ public class StorageInventoryController {
|
||||
PageResult<StorageInventoryDO> pageResult = storageInventoryService.realTimeInventory(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
@GetMapping("/getById")
|
||||
@Operation(summary = "获得根据物料跟仓库获取库存分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-inventory:query')")
|
||||
public CommonResult<StorageInventoryDO> getById(@Valid StorageInventoryPageReqVO pageReqVO) {
|
||||
LambdaQueryWrapper<StorageInventoryDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StorageInventoryDO::getMaterialId,pageReqVO.getMaterialId());
|
||||
wrapper.eq(StorageInventoryDO::getWhId,pageReqVO.getWhId());
|
||||
wrapper.orderByDesc(StorageInventoryDO::getYardAmount);
|
||||
wrapper.last("limit 1");
|
||||
StorageInventoryDO storageInventoryDO = storageInventoryMapper.selectOne(wrapper);
|
||||
return success(storageInventoryDO);
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,8 @@ public class StorageLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "库位")
|
||||
private Long pnId;
|
||||
|
||||
@Schema(description = "库位")
|
||||
private Long headerId;
|
||||
|
||||
|
||||
}
|
@ -1,15 +1,18 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagemat;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.StorageSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorder.DeliverOrderMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storage.StorageMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
||||
@ -69,6 +72,8 @@ public class StorageMatController {
|
||||
private StorageLogNowMapper storageLogNowMapper;
|
||||
@Resource
|
||||
private SerialNumberService serialNumberService;
|
||||
@Resource
|
||||
private PurchaseOrderNoDetailMapper purchaseOrderNoDetailMapper;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入/出库物料")
|
||||
@ -99,6 +104,8 @@ public class StorageMatController {
|
||||
public CommonResult<Long> createStorageMat(@Valid @RequestBody List<StorageMatSaveReqVO> createReqVO,@RequestParam("stockid") Long stockid) {
|
||||
storageMatService.deleteStorageMatList(stockid);
|
||||
List<String> attr3List = new ArrayList<>();
|
||||
|
||||
|
||||
for (StorageMatSaveReqVO item : createReqVO) {
|
||||
item.setId(null);
|
||||
if (item.getMatCode()!=null){
|
||||
@ -137,8 +144,6 @@ public class StorageMatController {
|
||||
bdgzsomthingService.updateById(bdgzsomthingDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -87,5 +87,9 @@ public class StorageMatRespVO {
|
||||
@Schema(description = "库存")
|
||||
@ExcelProperty("库存")
|
||||
private BigDecimal matRest;
|
||||
@Schema(description = "采购单id")
|
||||
private Long purchaseOrderNoId;
|
||||
@Schema(description = "采购单明细id")
|
||||
private Long purchaseOrderNoDetailId;
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagemat.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@ -52,4 +53,6 @@ public class StorageMatSaveReqVO {
|
||||
private BigDecimal amount;
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
private String projectSubName;
|
||||
private Long purchaseOrderNoDetailId;
|
||||
private Long purchaseOrderNoId;
|
||||
}
|
||||
|
@ -238,4 +238,6 @@ public class TaskDispatchController {
|
||||
List<TaskDispatchDO> list= taskDispatchService.getListJg(id,projectSubId);
|
||||
return success( list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,9 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Schema(description = "管理后台 - 派工单分页 Request VO")
|
||||
@Data
|
||||
@ -37,4 +39,7 @@ public class TaskDispatchDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "项目或子项目id")
|
||||
private String subOrDetailName;
|
||||
@Schema(description = "工序集合")
|
||||
Set<String> procedureIds;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.config.HeliWebConfiguration;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationSaveReqVO;
|
||||
@ -64,7 +65,7 @@ public class UnqualifiedNotificationController {
|
||||
@PostMapping("/createWx")
|
||||
@Operation(summary = "创建品质异常通知单审核Wx")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:create')")
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,@RequestHeader("id") String id) {
|
||||
public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,@RequestHeader("id") String id,@RequestHeader("type") String type) {
|
||||
if (file.isEmpty()) {
|
||||
System.out.println(file);
|
||||
return error(500,"The file is empty.");
|
||||
@ -93,7 +94,9 @@ public class UnqualifiedNotificationController {
|
||||
fileDO.setUnqualifiedId(Long.valueOf(id));
|
||||
fileDO.setFileName(fileName);
|
||||
fileDO.setFileUrl( HeliWebConfiguration.FILE_URL+id+"/"+fileName);
|
||||
|
||||
if (type != null){
|
||||
fileDO.setType(Integer.valueOf(type));
|
||||
}
|
||||
fileDO.setFilePath(directory+id+"/" + fileName);
|
||||
unqualifiedNotificationFileService.createUnqualifiedNotificationFile(fileDO);
|
||||
return success("File uploaded successfully: " + fileName);
|
||||
@ -119,7 +122,15 @@ public class UnqualifiedNotificationController {
|
||||
unqualifiedNotificationService.operate(operateReqVO);
|
||||
return success(operateReqVO.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/operateWx")
|
||||
@Operation(summary = "操作更新品质异常通知单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
|
||||
@OperateLog(enable = false)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<Long> operateWx(@Valid @RequestBody UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||
unqualifiedNotificationService.operateWx(operateReqVO);
|
||||
return success(operateReqVO.getId());
|
||||
}
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除品质异常通知单审核")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@ -147,7 +158,7 @@ public class UnqualifiedNotificationController {
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId());
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),0);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
@ -159,6 +170,62 @@ public class UnqualifiedNotificationController {
|
||||
|
||||
return success(BeanUtils.toBean(unqualifiedNotificationPage, UnqualifiedNotificationRespVO.class));
|
||||
}
|
||||
@GetMapping("/pageWx")
|
||||
@Operation(summary = "获得品质异常通知单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<PageResult<UnqualifiedNotificationDO>> getUnqualifiedNotificationPageWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
int i = (pageReqVO.getPageNo()-1) * pageReqVO.getPageSize();
|
||||
pageReqVO.setPageNum(i);
|
||||
PageResult<UnqualifiedNotificationDO> unqualifiedNotificationPage = unqualifiedNotificationService.getUnqualifiedNotificationPageWx(pageReqVO);
|
||||
List<UnqualifiedNotificationDO> list = unqualifiedNotificationPage.getList();
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
Integer type = 0;
|
||||
if (unqualifiedNotificationDO.getTypeName().equals("过程检")){
|
||||
type = 2;
|
||||
}else if (unqualifiedNotificationDO.getTypeName().equals("终检")){
|
||||
type = 1;
|
||||
}
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),type);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success(unqualifiedNotificationPage);
|
||||
}
|
||||
@GetMapping("/countWx")
|
||||
@Operation(summary = "获得品质异常通知单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<Long> countWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
return success(unqualifiedNotificationService.countWx(pageReqVO));
|
||||
}
|
||||
@GetMapping("/detailWx")
|
||||
@Operation(summary = "获得品质异常通知单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<UnqualifiedNotificationDO> detailWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
UnqualifiedNotificationDO unqualifiedNotificationDO = unqualifiedNotificationService.getUnqualifiedNotificationWxById(pageReqVO);
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
Integer type = 0;
|
||||
if (unqualifiedNotificationDO.getTypeName().equals("过程检")){
|
||||
type = 1;
|
||||
}else if (unqualifiedNotificationDO.getTypeName().equals("终检")){
|
||||
type = 2;
|
||||
}
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),type);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
return success(unqualifiedNotificationDO);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出品质异常通知单审核 Excel")
|
||||
@ -176,9 +243,74 @@ public class UnqualifiedNotificationController {
|
||||
@GetMapping("/statisticPage")
|
||||
@Operation(summary = "获得品质异常单统计分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<PageResult<UnqualifiedNotificationRespVO>> getUnqualifiedNotificationStatisticPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
PageResult<UnqualifiedNotificationDO> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationStatisticPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, UnqualifiedNotificationRespVO.class));
|
||||
public CommonResult<PageResult<QualityStatistics>> getUnqualifiedNotificationStatisticPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
try {
|
||||
PageResult<QualityStatistics> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationStatisticPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success(null);
|
||||
}
|
||||
@GetMapping("/exportStatisticPage")
|
||||
@Operation(summary = "导出质量异常统计 Excel")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStatisticPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<QualityStatistics> list = unqualifiedNotificationService.getUnqualifiedNotificationStatisticPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "质量异常统计.xls", "数据", QualityStatistics.class,
|
||||
BeanUtils.toBean(list, QualityStatistics.class));
|
||||
}
|
||||
@PostMapping("/review")
|
||||
@Operation(summary = "质量异常统计审核")
|
||||
public CommonResult<Boolean> review(@Valid @RequestBody UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
unqualifiedNotificationService.review(pageReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/unqualifiedNotificationConfirmPageWx")
|
||||
@Operation(summary = "获得品质异常通知单确认分页")
|
||||
public CommonResult<PageResult<UnqualifiedNotificationDO>> unqualifiedNotificationConfirmPageWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
int i = (pageReqVO.getPageNo()-1) * pageReqVO.getPageSize();
|
||||
pageReqVO.setPageNum(i);
|
||||
PageResult<UnqualifiedNotificationDO> unqualifiedNotificationPage = unqualifiedNotificationService.unqualifiedNotificationConfirmPageWx(pageReqVO);
|
||||
List<UnqualifiedNotificationDO> list = unqualifiedNotificationPage.getList();
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
Integer type = 0;
|
||||
if (unqualifiedNotificationDO.getTypeName().equals("过程检")){
|
||||
type = 2;
|
||||
}else if (unqualifiedNotificationDO.getTypeName().equals("终检")){
|
||||
type = 1;
|
||||
}
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),type);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success(unqualifiedNotificationPage);
|
||||
}
|
||||
@PostMapping("/confirm")
|
||||
@Operation(summary = "确认品质异常通知单")
|
||||
@OperateLog(enable = false)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<Long> confirm(@Valid @RequestBody UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||
unqualifiedNotificationService.confirm(operateReqVO);
|
||||
return success(operateReqVO.getId());
|
||||
}
|
||||
@GetMapping("/countWx1")
|
||||
@Operation(summary = "获得品质异常通知单确认消息")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<Long> countWx1(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
return success(unqualifiedNotificationService.countWx1(pageReqVO));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
|
||||
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class QualityStatistics {
|
||||
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ExcelProperty("客户名称")
|
||||
private String customerName;
|
||||
@ExcelProperty("子项目名称")
|
||||
private String projectSubName;
|
||||
@ExcelProperty("零件名称")
|
||||
private String bomName;
|
||||
@ExcelProperty(value = "质检类型", converter = DictConvert.class)
|
||||
@DictFormat("heli_inspection_type")
|
||||
private Integer type;
|
||||
@ExcelProperty("是否合格")
|
||||
private String isQua;
|
||||
@ExcelProperty("异常情况描述 ")
|
||||
private String remark;
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal amount;
|
||||
@ExcelProperty("检验人")
|
||||
private String userName;
|
||||
@ExcelProperty("检验时间")
|
||||
private String testingTime;
|
||||
@ExcelProperty("工序")
|
||||
private String procedureName;
|
||||
@ExcelProperty("审核人")
|
||||
private String auditorName;
|
||||
@ExcelProperty("审核时间")
|
||||
private String auditTime;
|
||||
@ExcelProperty(value = "审核意见", converter = DictConvert.class)
|
||||
@DictFormat("heli_unqualified_notification_opinion")
|
||||
private Integer auditOpinion;
|
||||
@ExcelProperty("项目编码")
|
||||
private String projectCode;
|
||||
@ExcelProperty("子项目编码")
|
||||
private String projectSubNumber;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String notificationStatus;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -17,6 +17,8 @@ import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_Y
|
||||
@ToString(callSuper = true)
|
||||
public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
|
||||
private Long Id;
|
||||
|
||||
@Schema(description = "编号,唯一")
|
||||
private String code;
|
||||
|
||||
@ -82,6 +84,7 @@ public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
@Schema(description = "创建人名称")
|
||||
private String creatorName;
|
||||
|
||||
private Integer pageNum;
|
||||
@Schema(description = "最小创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime minCreateTime;
|
||||
@ -89,4 +92,6 @@ public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
@Schema(description = "最大创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime maxCreateTime;
|
||||
|
||||
private Integer queryType;
|
||||
}
|
||||
|
@ -45,7 +45,13 @@ public class ZjBgMasterLineController {
|
||||
public CommonResult<Integer> endBg(@Valid @RequestBody ZjBgMasterLineSaveReqVO createReqVO) {
|
||||
return success(zjBgMasterLineService.updateBgMasterLines(createReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/validExceed")
|
||||
@Operation(summary = "获得过程检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:bg-master-line:query')")
|
||||
public CommonResult<Boolean> validExceed(@RequestParam("id") Long id,@RequestParam("amount") Integer amount) {
|
||||
return success(zjBgMasterLineService.validExceed(id,amount));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建终检报工")
|
||||
@ -69,7 +75,7 @@ public class ZjBgMasterLineController {
|
||||
@Operation(summary = "删除终检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:delete')")
|
||||
public CommonResult<Boolean> deleteZjBgMasterLine(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Boolean> deleteZjBgMasterLine(@RequestParam("id") Long id) {
|
||||
zjBgMasterLineService.deleteZjBgMasterLine(id);
|
||||
return success(true);
|
||||
}
|
||||
@ -78,7 +84,7 @@ public class ZjBgMasterLineController {
|
||||
@Operation(summary = "获得终检报工")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-bg-master-line:query')")
|
||||
public CommonResult<ZjBgMasterLineRespVO> getZjBgMasterLine(@RequestParam("id") Integer id) {
|
||||
public CommonResult<ZjBgMasterLineRespVO> getZjBgMasterLine(@RequestParam("id") Long id) {
|
||||
ZjBgMasterLineDO zjBgMasterLine = zjBgMasterLineService.getZjBgMasterLine(id);
|
||||
return success(BeanUtils.toBean(zjBgMasterLine, ZjBgMasterLineRespVO.class));
|
||||
}
|
||||
|
@ -53,5 +53,14 @@ public class ZjBgMasterLineRespVO {
|
||||
@Schema(description = "报工人")
|
||||
@ExcelProperty("报工人")
|
||||
private String userName;
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
private List<String> fileUrlList;
|
||||
|
||||
}
|
@ -14,13 +14,13 @@ import java.time.LocalDateTime;
|
||||
public class ZjBgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24341")
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "终检ID", example = "30462")
|
||||
private Integer zjId;
|
||||
|
||||
@Schema(description = "终检检明细id", example = "21667")
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
|
||||
@Schema(description = "报工人")
|
||||
private String bgUser;
|
||||
@ -33,5 +33,14 @@ public class ZjBgMasterLineSaveReqVO {
|
||||
|
||||
@Schema(description = "工时")
|
||||
private BigDecimal workTime;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer type;
|
||||
private String userName;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
}
|
@ -55,7 +55,7 @@ public class ZjPgMasterController {
|
||||
@PostMapping("/zfZjPgMaster")
|
||||
@Operation(summary = "作废终检派工单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:zj-pg-master:create')")
|
||||
public CommonResult<Integer> zfZjPgMaster(@RequestParam("id") Integer id) {
|
||||
public CommonResult<Integer> zfZjPgMaster(@RequestParam("id") Long id) {
|
||||
return success(zjPgMasterService.zfZjPgMaster(id));
|
||||
}
|
||||
|
||||
|
@ -81,5 +81,6 @@ public class ZjPgMasterLinePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "派工状态", example = "1-2-3")
|
||||
private Integer dispatchStatus;
|
||||
|
||||
@Schema(description = "扫码查询")
|
||||
private String subOrDetailName;
|
||||
}
|
@ -28,7 +28,7 @@ public class BgMasterLineDO extends BaseDO {
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
private Long id;
|
||||
/**
|
||||
* 过程检ID
|
||||
*/
|
||||
@ -36,7 +36,7 @@ public class BgMasterLineDO extends BaseDO {
|
||||
/**
|
||||
* 过程检明细id
|
||||
*/
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
/**
|
||||
* 报工人
|
||||
*/
|
||||
@ -60,5 +60,14 @@ public class BgMasterLineDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
}
|
@ -53,6 +53,14 @@ public class FpUserDetailDO extends BaseDO {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 工序id
|
||||
*/
|
||||
private Long procedureId;
|
||||
/**
|
||||
* 工序编码
|
||||
*/
|
||||
private String code;
|
||||
@TableField(exist = false)
|
||||
private String nickName;
|
||||
@TableField(exist = false)
|
||||
@ -61,4 +69,6 @@ public class FpUserDetailDO extends BaseDO {
|
||||
private String postName ;
|
||||
@TableField(exist = false)
|
||||
private String remarks;
|
||||
@TableField(exist = false)
|
||||
private String procedureName ;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class InvoiceDO extends BaseDO {
|
||||
*
|
||||
* 枚举 {@link TODO heli_invoice_type 对应的类}
|
||||
*/
|
||||
private String type;
|
||||
private Integer type;
|
||||
/**
|
||||
* 开票日期
|
||||
*/
|
||||
@ -82,6 +82,7 @@ public class InvoiceDO extends BaseDO {
|
||||
* 作废时间
|
||||
*/
|
||||
private LocalDateTime cancelTime;
|
||||
private Long cgOrderIdId;
|
||||
/**
|
||||
* 单据状态 已保存|已提交|已作废 1|2|3
|
||||
*/
|
||||
|
@ -0,0 +1,74 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 借用行 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("jy_master_line")
|
||||
@KeySequence("jy_master_line_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MasterLineDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 借用id
|
||||
*/
|
||||
private Integer jyId;
|
||||
/**
|
||||
* 借用物料
|
||||
*/
|
||||
private String jyMaster;
|
||||
/**
|
||||
* 借用数量
|
||||
*/
|
||||
private String jyNum;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String rem;
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private Long matId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String jyUsers;
|
||||
@TableField(exist = false)
|
||||
private String jyBms;
|
||||
@TableField(exist = false)
|
||||
private String jyTypes;
|
||||
@TableField(exist = false)
|
||||
private String jyMasters;
|
||||
@TableField(exist = false)
|
||||
private String jyMasterName;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal quantityLent;
|
||||
@TableField(exist = false)
|
||||
private String jyYt;
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime jyDate;
|
||||
@TableField(exist = false)
|
||||
private String rems;
|
||||
|
||||
|
||||
|
||||
}
|
@ -182,4 +182,16 @@ public class MaterialDO extends TenantBaseDO {
|
||||
private Long materialTypeId;
|
||||
@TableField(exist = false)
|
||||
private String matUnitId;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal purchaseRemAmount;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal estimatedPrice;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal purchaseAmount;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal unitPrice;
|
||||
@TableField(exist = false)
|
||||
private Long purchaseOrderNoDetailId;
|
||||
@TableField(exist = false)
|
||||
private Long purchaseOrderNoId;
|
||||
}
|
||||
|
@ -60,5 +60,16 @@ public class OrderYfDO extends BaseDO {
|
||||
private String rem;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal amount;
|
||||
@TableField(exist = false)
|
||||
private Integer receivingStatus;
|
||||
@TableField(exist = false)
|
||||
private Long projectId;
|
||||
@TableField(exist = false)
|
||||
private String projectCode;
|
||||
@TableField(exist = false)
|
||||
private String yfRatio;
|
||||
@TableField(exist = false)
|
||||
private String ykRatio;
|
||||
|
||||
|
||||
}
|
@ -81,7 +81,16 @@ public class OrderYsDO extends BaseDO {
|
||||
private BigDecimal fiveFuKuan;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal sixFuKuan;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer deliveryStatus;
|
||||
@TableField(exist = false)
|
||||
private Long projectId;
|
||||
@TableField(exist = false)
|
||||
private String projectCode;
|
||||
@TableField(exist = false)
|
||||
private String ysRatio;
|
||||
@TableField(exist = false)
|
||||
private String ykRatio;
|
||||
|
||||
|
||||
}
|
@ -5,12 +5,14 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
import lombok.*;
|
||||
import org.apache.poi.hpsf.Date;
|
||||
import org.apache.poi.hpsf.Decimal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工艺bom明细 DO
|
||||
@ -189,6 +191,19 @@ public class ProcessBomDetailDO extends BaseDO {
|
||||
private String projectNameSim;
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer planBoomExists;
|
||||
@TableField(exist = false)
|
||||
private Integer purYard;
|
||||
@TableField(exist = false)
|
||||
private Integer makeStatus;
|
||||
@TableField(exist = false)
|
||||
private Integer receivingStatus;
|
||||
@TableField(exist = false)
|
||||
private Integer orderNoExists;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal boomAmounts;
|
||||
@TableField(exist = false)
|
||||
private List<TaskDispatchDetailDO> taskDispatchDetailDOList;
|
||||
|
||||
}
|
||||
|
@ -157,4 +157,21 @@ public class ProcessDesignDO extends BaseDO {
|
||||
|
||||
private String reReason;
|
||||
private LocalDateTime reTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String blankDeferred;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String deferred3d;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String deferred2d;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String blankDelayReason;
|
||||
@TableField(exist = false)
|
||||
private String delayReason2d;
|
||||
@TableField(exist = false)
|
||||
private String delayReason3d;
|
||||
}
|
||||
|
@ -271,6 +271,8 @@ public class ProjectOrderDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private int projectYear;
|
||||
@TableField(exist = false)
|
||||
private String deviceModel;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Long projectSubId;
|
||||
@ -280,17 +282,19 @@ public class ProjectOrderDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String unitName;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal cailiaoCost;
|
||||
/*
|
||||
* 运费成本
|
||||
* */
|
||||
@TableField(exist = false)
|
||||
private BigDecimal yunFeiCost;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal jiaGongShiCost;
|
||||
private BigDecimal neibuCost;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal biaoZhunJianCost;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal qitaCost;
|
||||
private BigDecimal waixeiCost;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal sumCost;
|
||||
/**
|
||||
|
@ -148,6 +148,8 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String postalCode;
|
||||
@TableField(exist = false)
|
||||
private String submitUserName;
|
||||
@TableField(exist = false)
|
||||
private String deliveryAddress;
|
||||
@TableField(exist = false)
|
||||
private Integer receivingStatus1;
|
||||
|
@ -138,5 +138,7 @@ public class StorageDO extends BaseDO {
|
||||
private String signature;
|
||||
@TableField(exist = false)
|
||||
private Date date;
|
||||
@TableField(exist = false)
|
||||
private Long headerId;
|
||||
|
||||
}
|
@ -175,7 +175,8 @@ public class TaskDispatchDO extends BaseDO {
|
||||
public boolean canOperate(OperateTypeEnum operateTypeEnum) {
|
||||
switch (operateTypeEnum){
|
||||
case SAVE:
|
||||
return canSave();
|
||||
return true;
|
||||
// return canSave();
|
||||
case SUBMIT:
|
||||
return canSubmit();
|
||||
case CANCEL_SUBMIT:
|
||||
|
@ -225,6 +225,8 @@ public class TaskDispatchDetailDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String nameSim;
|
||||
@TableField(exist = false)
|
||||
private String blueprintNo;
|
||||
@TableField(exist = false)
|
||||
private String projectNameSim;
|
||||
@TableField(exist = false)
|
||||
private Long duEmpId;
|
||||
@ -232,9 +234,13 @@ public class TaskDispatchDetailDO extends BaseDO {
|
||||
private BigDecimal matWeight;
|
||||
@TableField(exist = false)
|
||||
private String nickname;
|
||||
|
||||
@TableField(exist = false)
|
||||
private BigDecimal workingHours;
|
||||
@TableField(exist = false)
|
||||
private LocalDateTime reportTime;
|
||||
private Integer reportStatus;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer flag;
|
||||
//是否泡沫, 是-Y 否 -N
|
||||
private String isFoam;
|
||||
}
|
||||
|
@ -94,7 +94,6 @@ public class UnqualifiedNotificationDO extends BaseDO {
|
||||
* 审核时间
|
||||
*/
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String projectName;
|
||||
|
||||
@ -139,11 +138,20 @@ public class UnqualifiedNotificationDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String creatorName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer totalAmount;
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
@TableField(exist = false)
|
||||
private String statisticAmount;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
@TableField(exist = false)
|
||||
private Integer isRepre;
|
||||
@TableField(exist = false)
|
||||
private Integer isQua;
|
||||
@TableField(exist = false)
|
||||
private Integer conStatus;
|
||||
public boolean canSave(){
|
||||
return UnqualifiedNotificationStatusEnum.SAVE.getCode() == this.notificationStatus.intValue();
|
||||
}
|
||||
|
@ -41,4 +41,5 @@ public class UnqualifiedNotificationFileDO extends BaseDO {
|
||||
private String fileName;
|
||||
private String filePath;
|
||||
private String fileUrl;
|
||||
private Integer type;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
private Long id;
|
||||
/**
|
||||
* 终检ID
|
||||
*/
|
||||
@ -36,7 +36,7 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
/**
|
||||
* 终检检明细id
|
||||
*/
|
||||
private Integer zjMxId;
|
||||
private Long zjMxId;
|
||||
/**
|
||||
* 报工人
|
||||
*/
|
||||
@ -61,6 +61,15 @@ public class ZjBgMasterLineDO extends BaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
private Integer isRepre;
|
||||
private Integer isQua;
|
||||
private String remark;
|
||||
private Integer notificationStatus;
|
||||
private Integer conStatus;
|
||||
private String auditOpinion;
|
||||
private Integer auditor;
|
||||
private LocalDateTime audit_time;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
|
||||
}
|
@ -30,7 +30,8 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
.select("u2.username as userName")
|
||||
.leftJoin("system_users u2 on u2.id = t.bg_user")
|
||||
;
|
||||
query.eq(BgMasterLineDO::getZjMxId, reqVO.getZjMxId());
|
||||
query.eq(BgMasterLineDO::getZjMxId, reqVO.getZjMxId())
|
||||
.orderByDesc(BgMasterLineDO::getId);
|
||||
return selectPage(reqVO, query);
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
.orderByDesc(BgMasterLineDO::getId))
|
||||
;*/
|
||||
}
|
||||
default BgMasterLineDO selectSum(Integer zjMxId) {
|
||||
default BgMasterLineDO selectSum(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("SUM(t.amount) as amount ,SUM(t.work_time) as workTime");
|
||||
|
||||
@ -57,7 +58,19 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectEnd(Integer zjMxId) {
|
||||
default BgMasterLineDO selectCountUn(Integer type) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("count(1) as amount");
|
||||
|
||||
|
||||
query
|
||||
.eq(BgMasterLineDO::getNotificationStatus,type)
|
||||
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectEnd(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
@ -67,5 +80,39 @@ public interface BgMasterLineMapper extends BaseMapperX<BgMasterLineDO> {
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default BgMasterLineDO selectLast(Long zjMxId) {
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.orderByDesc(BgMasterLineDO::getId)
|
||||
.last("limit 1");
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
|
||||
default Long getByDispatchDetail(Long id){
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query
|
||||
.leftJoin(PgMasterLineDO.class, "a", PgMasterLineDO::getId, BgMasterLineDO::getZjMxId);
|
||||
|
||||
query.eq( PgMasterLineDO::getDispatchDetailId, id)
|
||||
.eq(PgMasterLineDO::getDeleted,0)
|
||||
.eq(BgMasterLineDO::getIsQua,1)
|
||||
.in(BgMasterLineDO::getAuditOpinion,1,3);
|
||||
;
|
||||
|
||||
return selectCount(query);
|
||||
}
|
||||
|
||||
default Long getCount(Long id){
|
||||
MPJLambdaWrapper<BgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query
|
||||
.leftJoin(PgMasterLineDO.class, "a", PgMasterLineDO::getId, BgMasterLineDO::getZjMxId);
|
||||
|
||||
query.eq( PgMasterLineDO::getDispatchDetailId, id)
|
||||
.eq(PgMasterLineDO::getDeleted,0);
|
||||
return selectCount(query);
|
||||
}
|
||||
}
|
@ -8,6 +8,7 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.fpuserdetail.vo.FpUserD
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.fpuserdetail.vo.FpUserDetailSaveReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuser.FpUserDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -32,10 +33,12 @@ public interface FpUserDetailMapper extends BaseMapperX<FpUserDetailDO> {
|
||||
default PageResult<FpUserDetailDO> selectPage(FpUserDetailPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<FpUserDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(FpUserDetailDO.class)
|
||||
.select("u.nickname as nickName")
|
||||
.select("u.nickname as nickName,p.name as procedureName")
|
||||
.select("a.type as type","a.remark as remarks")
|
||||
.leftJoin(AdminUserDO.class, "u", AdminUserDO::getId, FpUserDetailDO::getBusyId)
|
||||
.leftJoin(FpUserDO.class, "a", FpUserDO::getId, FpUserDetailDO::getFpId)
|
||||
.leftJoin(ProcedureDO.class,"p",ProcedureDO::getId, FpUserDetailDO::getProcedureId)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(FpUserDetailDO::getId);
|
||||
query.like(!StringUtils.isEmpty(reqVO.getBusyId()), "u.nickname", reqVO.getBusyId())
|
||||
.like(!StringUtils.isEmpty(reqVO.getPostId()),FpUserDetailDO::getPostId, reqVO.getPostId())
|
||||
|
@ -74,4 +74,13 @@ public interface InvoiceMapper extends BaseMapperX<InvoiceDO> {
|
||||
}
|
||||
return selectOne(query);
|
||||
}
|
||||
|
||||
default PageResult<InvoiceDO> selectPages(InvoicePageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<InvoiceDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(InvoiceDO.class);
|
||||
query.eq(InvoiceDO::getCgOrderIdId, pageReqVO.getId());
|
||||
query.eq(InvoiceDO::getBusinessType, pageReqVO.getType());
|
||||
return selectPage(pageReqVO, query);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline.MasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||
@ -28,10 +29,14 @@ public interface MasterMapper extends BaseMapperX<MasterDO> {
|
||||
MPJLambdaWrapper<MasterDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MasterDO.class)
|
||||
.select("b.nickname as jyUsers,c.name as jyBms,d.name as jyMasters")
|
||||
.leftJoin(MasterLineDO.class, "a", MasterLineDO::getJyId, MasterDO::getId)
|
||||
.leftJoin(AdminUserDO.class,"b",AdminUserDO::getId,MasterDO::getJyUser)
|
||||
.leftJoin(DeptDO.class,"c",DeptDO::getId,MasterDO::getJyBm)
|
||||
.leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterDO::getJyMaster)
|
||||
.leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterLineDO::getMatId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(MasterDO::getId)
|
||||
.orderByDesc(MasterDO::getId);
|
||||
|
||||
query.eq(!ObjectUtil.isEmpty(reqVO.getJyYt()), MasterDO::getJyYt, reqVO.getJyYt())
|
||||
.eq(!ObjectUtil.isEmpty(reqVO.getJyType()), MasterDO::getJyType, reqVO.getJyType())
|
||||
.like(!ObjectUtil.isEmpty(reqVO.getJyBm()), DeptDO::getName, reqVO.getJyBm())
|
||||
@ -40,4 +45,5 @@ public interface MasterMapper extends BaseMapperX<MasterDO> {
|
||||
return selectPage(reqVO,query);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.masterline;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.MasterPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.masterline.MasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.masterline.vo.*;
|
||||
|
||||
/**
|
||||
* 借用行 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface MasterLineMapper extends BaseMapperX<MasterLineDO> {
|
||||
|
||||
default PageResult<MasterLineDO> selectPage(MasterLinePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<MasterLineDO>()
|
||||
.betweenIfPresent(MasterLineDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(MasterLineDO::getJyId, reqVO.getJyId())
|
||||
.eqIfPresent(MasterLineDO::getJyMaster, reqVO.getJyMaster())
|
||||
.eqIfPresent(MasterLineDO::getJyNum, reqVO.getJyNum())
|
||||
.eqIfPresent(MasterLineDO::getRem, reqVO.getRem())
|
||||
.eqIfPresent(MasterLineDO::getMatId, reqVO.getMatId())
|
||||
.orderByDesc(MasterLineDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<MasterLineDO> getMasterLinePage(MasterPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<MasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MasterLineDO.class)
|
||||
.select("b.nickname as jyUsers,c.name as jyBms,d.name as jyMasters,a.jy_type as jyTypes")
|
||||
.select("a.jy_yt as jyYt","a.jy_date as jyDate")
|
||||
.select("a.rem as rems")
|
||||
.leftJoin(MasterDO.class,"a",MasterDO::getId,MasterLineDO::getJyId)
|
||||
.leftJoin(AdminUserDO.class,"b",AdminUserDO::getId,MasterDO::getJyUser)
|
||||
.leftJoin(DeptDO.class,"c",DeptDO::getId,MasterDO::getJyBm)
|
||||
.leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterLineDO::getMatId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(MasterLineDO::getId)
|
||||
.orderByDesc(MasterLineDO::getId);
|
||||
|
||||
query.eq(!ObjectUtil.isEmpty(pageReqVO.getJyYt()), MasterDO::getJyYt, pageReqVO.getJyYt())
|
||||
.eq(!ObjectUtil.isEmpty(pageReqVO.getJyType()), MasterDO::getJyType, pageReqVO.getJyType())
|
||||
.like(!ObjectUtil.isEmpty(pageReqVO.getJyBm()), DeptDO::getName, pageReqVO.getJyBm())
|
||||
.like(!ObjectUtil.isEmpty(pageReqVO.getJyMaster()), MaterialDO::getName, pageReqVO.getJyMaster())
|
||||
.like(!ObjectUtil.isEmpty(pageReqVO.getJyUser()), AdminUserDO::getNickname, pageReqVO.getJyUser());
|
||||
return selectPage(pageReqVO,query);
|
||||
}
|
||||
}
|
@ -9,12 +9,14 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLo
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pn.PnDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.rg.RgDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageinventory.StorageInventoryDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.warehouse.WarehouseDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.MaterialTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.YesOrNoEnum;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
||||
@ -216,4 +218,33 @@ public interface MaterialMapper extends BaseMapperX<MaterialDO> {
|
||||
}
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<MaterialDO> getStorageNowMaterialNoPage(StorageLogPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<MaterialDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MaterialDO.class)
|
||||
.select("ifnull(sum(s.yard_amount),0) matRest")
|
||||
.select("t.name as matName,t.code as matCode,d.label as matType,t.spec as matSpec,t.brand as matBrand")
|
||||
.select("d1.label as matUnit")
|
||||
.select("p.id as purchaseOrderNoDetailId,p.purchase_order_id as purchaseOrderNoId")
|
||||
.select("p.purchase_amount as purchaseAmount","p.estimated_price as estimatedPrice")
|
||||
.select("p.purchase_rem_amount as purchaseRemAmount","ROUND(p.estimated_price / NULLIF(p.purchase_amount, 0)) AS unitPrice")
|
||||
.leftJoin(StorageInventoryDO.class, "s", StorageInventoryDO::getMaterialId, MaterialDO::getId)
|
||||
.leftJoin(PurchaseOrderNoDetailDO.class,"p",PurchaseOrderNoDetailDO::getMaterialId, MaterialDO::getId)
|
||||
.leftJoin(DictDataDO.class,"d",DictDataDO::getValue, MaterialDO::getMaterialType)
|
||||
.leftJoin(DictDataDO.class,"d1",DictDataDO::getValue, MaterialDO::getUnit)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(MaterialDO::getId)
|
||||
.orderByDesc(MaterialDO::getId);
|
||||
|
||||
query.like(!com.alibaba.druid.util.StringUtils.isEmpty(pageReqVO.getMatSpec()),MaterialDO::getSpec, pageReqVO.getMatSpec())
|
||||
.like(!com.alibaba.druid.util.StringUtils.isEmpty(pageReqVO.getMatName()), MaterialDO::getName, pageReqVO.getMatName())
|
||||
.like(!com.alibaba.druid.util.StringUtils.isEmpty(pageReqVO.getMatCode()), MaterialDO::getCode, pageReqVO.getMatCode())
|
||||
.eq(true,PurchaseOrderNoDetailDO::getPurchaseOrderId, pageReqVO.getHeaderId())
|
||||
.eq(true,MaterialDO::getVirtualPart, YesOrNoEnum.N.name())
|
||||
.eq(MaterialDO::getStatus,1)
|
||||
.eq("d.dict_type","heli_material_type")
|
||||
.eq("d1.dict_type","heli_material_unit")
|
||||
;
|
||||
return selectPage(pageReqVO,query);
|
||||
}
|
||||
}
|
||||
|
@ -237,6 +237,7 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
|
||||
.disableSubLogicDel();
|
||||
query
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectName()),MaterialPlanDO::getProjectName, pageReqVO.getProjectName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getBlueprintNo()),ProcessBomDetailDO::getBlueprintNo, pageReqVO.getBlueprintNo())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectSubName()), MaterialPlanDO::getName, pageReqVO.getProjectSubName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getMaterialName()), MaterialPlanBoomDO::getMatName, pageReqVO.getMaterialName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getMatName()), MaterialPlanBoomDO::getMatName, pageReqVO.getMatName())
|
||||
|
@ -9,6 +9,8 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.orderys.vo.OrderYsPageR
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderyf.OrderYfDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.orderys.OrderYsDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.*;
|
||||
@ -27,8 +29,16 @@ public interface OrderYfMapper extends BaseMapperX<OrderYfDO> {
|
||||
MPJLambdaWrapper<OrderYfDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(OrderYfDO.class)
|
||||
.select("sum(i.amount) as amount")
|
||||
.select("CASE " +
|
||||
" WHEN COUNT(d.id) = 0 THEN 1 " + // 无子记录
|
||||
" WHEN SUM(CASE d.receiving_status WHEN 3 THEN 0 ELSE 1 END) = 0 THEN 3 " + // 全部为3
|
||||
" WHEN SUM(CASE d.receiving_status WHEN 1 THEN 1 ELSE 0 END) = COUNT(d.id) THEN 1 " + // 全部为1
|
||||
" ELSE 2 " + // 其他情况
|
||||
"END AS receivingStatus")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
.leftJoin(PurchaseOrderNoDO.class,"p", PurchaseOrderNoDO::getPurchaseNo, OrderYfDO::getCgOrderNum)
|
||||
.leftJoin(PurchaseOrderNoDetailDO.class,"d", PurchaseOrderNoDetailDO::getPurchaseOrderId, PurchaseOrderNoDO::getId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(OrderYfDO::getId)
|
||||
.orderByDesc(OrderYfDO::getCreateTime);
|
||||
@ -45,8 +55,10 @@ public interface OrderYfMapper extends BaseMapperX<OrderYfDO> {
|
||||
MPJLambdaWrapper<OrderYfDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(OrderYfDO.class)
|
||||
.select("sum(i.amount) as amount")
|
||||
.select("p.id as projectId","p.purchase_no as projectCode")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
"finance_invoice i ON i.order_code = t.cg_order_num AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_RECEIVE_INVOICE' AND i.status !='3'")
|
||||
.leftJoin(PurchaseOrderNoDO.class,"p", PurchaseOrderNoDO::getPurchaseNo, OrderYfDO::getCgOrderNum)
|
||||
.disableSubLogicDel();
|
||||
query
|
||||
.eq( OrderYsDO::getId, id);
|
||||
|
@ -31,8 +31,10 @@ public interface OrderYsMapper extends BaseMapperX<OrderYsDO> {
|
||||
MPJLambdaWrapper<OrderYsDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(OrderYsDO.class)
|
||||
.select("sum(i.amount) as amount")
|
||||
.select("p.delivery_status as deliveryStatus")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.code AND i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||
.leftJoin(ProjectOrderDO.class,"p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(OrderYsDO::getId)
|
||||
.orderByDesc(OrderYsDO::getCreateTime);
|
||||
@ -52,8 +54,9 @@ public interface OrderYsMapper extends BaseMapperX<OrderYsDO> {
|
||||
.select("sum(i.amount) as amount")
|
||||
.select("p.shou_Fu_Kuan as shouFuKuan","p.two_Fu_Kuan as twoFuKuan","p.three_Fu_Kuan as threeFuKuan")
|
||||
.select("p.four_Fu_Kuan as fourFuKuan","p.five_Fu_Kuan as fiveFuKuan","p.six_Fu_Kuan as sixFuKuan")
|
||||
.select("p.code as projectCode,p.id as projectId")
|
||||
.leftJoin(
|
||||
"finance_invoice i ON i.order_code = t.code AND i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||
.leftJoin(ProjectOrderDO.class, "p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
||||
.disableSubLogicDel();
|
||||
|
||||
|
@ -91,10 +91,16 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus());
|
||||
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
|
||||
query.and( e ->e.like(PgMasterLineDO::getProjectName, reqVO.getSubOrDetailName()).or().like(
|
||||
PgMasterLineDO::getProjectSubName, reqVO.getSubOrDetailName()
|
||||
).or().like(PgMasterLineDO::getMaterialName, reqVO.getSubOrDetailName()));
|
||||
// query.eq(" (b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
|
||||
}
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public interface PlanTaskMapper extends BaseMapperX<PlanTaskDO> {
|
||||
|
||||
query.selectAll(PlanTaskDO.class)
|
||||
.select("e.name as customerName","p.code as projectCode","p.project_name as projectName","p.project_end_time as projectEndTime")
|
||||
.select("pl.plan_no as planNo","ps.project_sub_code as projectSubCode","po.name as projectSubName","concat('BOM-', ps.project_sub_code) as bomCode")
|
||||
.select("pl.plan_no as planNo","ps.project_sub_code as projectSubCode","po.name as projectSubName"," ps.project_sub_code as bomCode")
|
||||
.leftJoin(PlanDO.class, "pl", PlanDO::getId, PlanTaskDO::getProjectPlanId)
|
||||
.leftJoin(PlanSubDO.class, "ps", PlanSubDO::getId, PlanTaskDO::getProjectPlanSubId)
|
||||
.leftJoin(ProjectOrderDO.class, "p", ProjectOrderDO::getId, PlanTaskDO::getProjectId)
|
||||
@ -72,7 +72,7 @@ public interface PlanTaskMapper extends BaseMapperX<PlanTaskDO> {
|
||||
MPJLambdaWrapper<PlanTaskDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(PlanTaskDO.class)
|
||||
.select("e.name as customerName","p.code as projectCode","p.project_name as projectName","p.project_end_time as projectEndTime")
|
||||
.select("pl.plan_no as planNo","po.amount as projectSubNum","ps.project_sub_code as projectSubCode","po.name as projectSubName","concat('BOM-', ps.project_sub_code) as bomCode")
|
||||
.select("pl.plan_no as planNo","po.amount as projectSubNum","ps.project_sub_code as projectSubCode","po.name as projectSubName"," ps.project_sub_code as bomCode")
|
||||
.leftJoin(PlanDO.class, "pl", PlanDO::getId, PlanTaskDO::getProjectPlanId)
|
||||
.leftJoin(PlanSubDO.class, "ps", PlanSubDO::getId, PlanTaskDO::getProjectPlanSubId)
|
||||
.leftJoin(ProjectOrderDO.class, "p", ProjectOrderDO::getId, PlanTaskDO::getProjectId)
|
||||
|
@ -11,6 +11,7 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo.Pro
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo.ProcessBoomRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo.PlanTaskBomPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
@ -93,7 +94,7 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
|
||||
default PageResult<ProcessBomDetailDO> selectPageNew(ProcessBomPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<ProcessBomDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDetailDO.class)
|
||||
.select("concat('BOM-', e.project_sub_code) as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select("e.project_sub_code as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select("a.plan_no as planCode", "b.code as projectCode", "c.name as customerName", "b.project_name as projectName")
|
||||
.select("d.name as projectSubName,f.name as compositionName")
|
||||
|
||||
@ -108,7 +109,7 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
|
||||
.disableSubLogicDel()
|
||||
;
|
||||
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0},concat('BOM-', e.project_sub_code )) > 0", reqVO.getCode()))
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0}, e.project_sub_code ) > 0", reqVO.getCode()))
|
||||
.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName())
|
||||
@ -236,4 +237,64 @@ public interface ProcessBomDetailMapper extends BaseMapperX<ProcessBomDetailDO>
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<ProcessBomDetailDO> planBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<ProcessBomDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDetailDO.class)
|
||||
.select("f.name as compositionName")
|
||||
.select("t.amount*d.amount as boomAmounts")
|
||||
.leftJoin(PlanTaskBomDO.class,"ptb",PlanTaskBomDO::getBomDetailId,ProcessBomDetailDO::getId)
|
||||
.leftJoin(PlanTaskDO.class,"pt",PlanTaskDO::getId,PlanTaskBomDO::getTaskId)
|
||||
.leftJoin(ProcessBomDO.class,"g",ProcessBomDO::getId,ProcessBomDetailDO::getBomId)
|
||||
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, ProcessBomDO::getProjectId)
|
||||
.leftJoin(CustomerDO.class, "c", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||
.leftJoin(ProjectOrderSubDO.class, "d", ProjectOrderSubDO::getId, ProcessBomDO::getProjectSubId)
|
||||
.leftJoin(AdminUserDO.class,"u",AdminUserDO::getId,PlanTaskBomDO::getOwner)
|
||||
.leftJoin(CompositionDO.class,"f",CompositionDO::getId,ProcessBomDetailDO::getCompositionId)
|
||||
.groupBy(ProcessBomDetailDO::getId)
|
||||
.disableSubLogicDel();
|
||||
query.like(!ObjectUtils.isEmpty(pageReqVO.getProjectCode()), ProjectOrderDO::getCode,pageReqVO.getProjectCode())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getProjectName()),ProjectOrderDO::getProjectName,pageReqVO.getProjectName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getTaskNo()),PlanTaskDO::getTaskNo,pageReqVO.getTaskNo())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getProjectSubName()),ProjectOrderSubDO::getName,pageReqVO.getProjectSubName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getMaterialName()),ProcessBomDetailDO::getMaterialName,pageReqVO.getMaterialName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getOwner()),AdminUserDO::getNickname,pageReqVO.getOwner())
|
||||
.eq(ProcessBomDetailDO::getType,2);
|
||||
return selectPage(pageReqVO, query);
|
||||
|
||||
}
|
||||
|
||||
default PageResult<ProcessBomDetailDO> planBZJPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<ProcessBomDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDetailDO.class)
|
||||
.select("f.name as compositionName")
|
||||
.select("CASE WHEN w.id IS NOT NULL THEN 1 ELSE 0 END AS planBoomExists")
|
||||
.select("w.is_pur_yard as purYard")
|
||||
.select("m.status as makeStatus")
|
||||
.select("r.receiving_status as receivingStatus")
|
||||
.select("CASE WHEN r.id IS NOT NULL THEN 1 ELSE 0 END AS orderNoExists")
|
||||
.select("t.amount*d.amount as boomAmounts")
|
||||
.leftJoin(PlanTaskBomDO.class,"ptb",PlanTaskBomDO::getBomDetailId,ProcessBomDetailDO::getId)
|
||||
.leftJoin(PlanTaskDO.class,"pt",PlanTaskDO::getId,PlanTaskBomDO::getTaskId)
|
||||
.leftJoin(ProcessBomDO.class,"g",ProcessBomDO::getId,ProcessBomDetailDO::getBomId)
|
||||
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, ProcessBomDO::getProjectId)
|
||||
.leftJoin(CustomerDO.class, "c", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||
.leftJoin(ProjectOrderSubDO.class, "d", ProjectOrderSubDO::getId, ProcessBomDO::getProjectSubId)
|
||||
.leftJoin(AdminUserDO.class,"u",AdminUserDO::getId,PlanTaskBomDO::getOwner)
|
||||
.leftJoin(CompositionDO.class,"f",CompositionDO::getId,ProcessBomDetailDO::getCompositionId)
|
||||
.leftJoin("project_material_plan_boom w on t.id=w.boom_detail_id and w.deleted=0 and w.tenant_id=2")
|
||||
.leftJoin("project_purchase_order_make_detail e on w.project_purchase_order_make_detail_id = e.id and e.deleted=0 and e.tenant_id=2")
|
||||
.leftJoin("project_purchase_order_make m on e.purchase_order_id=m.id and m.deleted=0 and e.tenant_id=2")
|
||||
.leftJoin("project_purchase_order_no_detail r on e.purchase_order_no_detail_id = r.id and r.deleted=0 and r.tenant_id=2")
|
||||
.groupBy(ProcessBomDetailDO::getId)
|
||||
.disableSubLogicDel();
|
||||
query.like(!ObjectUtils.isEmpty(pageReqVO.getProjectCode()), ProjectOrderDO::getCode,pageReqVO.getProjectCode())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getProjectName()),ProjectOrderDO::getProjectName,pageReqVO.getProjectName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getTaskNo()),PlanTaskDO::getTaskNo,pageReqVO.getTaskNo())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getProjectSubName()),ProjectOrderSubDO::getName,pageReqVO.getProjectSubName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getMaterialName()),ProcessBomDetailDO::getMaterialName,pageReqVO.getMaterialName())
|
||||
.like(!ObjectUtils.isEmpty(pageReqVO.getOwner()),AdminUserDO::getNickname,pageReqVO.getOwner())
|
||||
.eq(ProcessBomDetailDO::getType,1);
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -69,7 +70,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
default PageResult<ProcessBomDO> selectPages(ProcessBomPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<ProcessBomDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDO.class)
|
||||
.select("concat('BOM-', e.project_sub_code) as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select(" e.project_sub_code as bomCode", "e.project_sub_code as projectSubCode")
|
||||
// .select( "e.project_sub_code as projectSubCode")
|
||||
|
||||
.select("a.plan_no as planCode", "b.code as projectCode", "c.name as customerName", "b.project_name as projectName")
|
||||
@ -83,7 +84,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
.disableSubLogicDel()
|
||||
;
|
||||
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0},concat('BOM-', e.project_sub_code )) > 0", reqVO.getCode()))
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0}, e.project_sub_code ) > 0", reqVO.getCode()))
|
||||
.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName())
|
||||
@ -100,7 +101,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
default PageResult<ProcessBomDO> selectPage(ProcessBomPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<ProcessBomDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDO.class)
|
||||
.select("concat('BOM-', e.project_sub_code) as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select(" e.project_sub_code as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select("a.plan_no as planCode", "b.code as projectCode", "c.name as customerName", "b.project_name as projectName")
|
||||
.select("d.name as projectSubName")
|
||||
.leftJoin(PlanDO.class, "a", PlanDO::getId, ProcessBomDO::getPlanId)
|
||||
@ -112,7 +113,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
.disableSubLogicDel()
|
||||
;
|
||||
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0},concat('BOM-', e.project_sub_code )) > 0", reqVO.getCode()))
|
||||
query.and(!StringUtils.isEmpty(reqVO.getCode()), QueryWrapper -> QueryWrapper.apply("locate({0}, e.project_sub_code ) > 0", reqVO.getCode()))
|
||||
.like(!StringUtils.isEmpty(reqVO.getPlanCode()), PlanDO::getPlanNo, reqVO.getPlanCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectCode()), ProjectOrderDO::getCode, reqVO.getProjectCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), CustomerDO::getName, reqVO.getCustomerName())
|
||||
@ -168,7 +169,7 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
default ProcessBomDO selectByIdbyid(Long id) {
|
||||
MPJLambdaWrapper<ProcessBomDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProcessBomDO.class)
|
||||
.select("concat('BOM-', e.project_sub_code) as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select(" e.project_sub_code as bomCode", "e.project_sub_code as projectSubCode")
|
||||
.select("a.plan_no as planCode", "b.code as projectCode", "c.name as customerName", "b.project_name as projectName")
|
||||
.select("d.name as projectSubName")
|
||||
.leftJoin(PlanDO.class, "a", PlanDO::getId, ProcessBomDO::getPlanId)
|
||||
@ -184,4 +185,14 @@ public interface ProcessBomMapper extends BaseMapperX<ProcessBomDO> {
|
||||
}
|
||||
List<ProcessBomDO> getProcessBomPagesall();
|
||||
PlanDO getplanid(Long id);
|
||||
|
||||
BigDecimal StandardPartsCost(@Param("id") Long id,@Param("projectSubId") Long projectSubId);
|
||||
|
||||
BigDecimal materialCost(@Param("id") Long id,@Param("projectSubId") Long projectSubId);
|
||||
|
||||
BigDecimal outsourcedProcessingFee(@Param("id") Long id,@Param("projectSubId") Long projectSubId);
|
||||
|
||||
BigDecimal bubbleFees(@Param("id") Long id,@Param("projectSubId") Long projectSubId);
|
||||
|
||||
BigDecimal internalLaborCost(@Param("id") Long id,@Param("projectSubId") Long projectSubId);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equip.EquipDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||
@ -41,9 +42,12 @@ public interface ProjectOrderMapper extends BaseMapperX<ProjectOrderDO> {
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
.select("a.id as projectSubId,a.name as projectSubName")
|
||||
.select("b.name as customerName")
|
||||
.select("b.name as customerName,e.name as deviceModel")
|
||||
|
||||
.leftJoin(ProjectOrderSubDO.class,"a",ProjectOrderSubDO::getProjectOrderId,ProjectOrderDO::getId)
|
||||
.leftJoin(CustomerDO.class,"b",CustomerDO::getId,ProjectOrderDO::getCustomerId)
|
||||
.leftJoin(EquipDO.class,"e",EquipDO::getId,ProjectOrderSubDO::getDeviceModel)
|
||||
.disableSubLogicDel()
|
||||
.like(!StringUtils.isEmpty(reqVO.getCode()),ProjectOrderDO::getCode,reqVO.getCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectName()),ProjectOrderDO::getProjectName,reqVO.getProjectName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()),"b.name",reqVO.getCustomerName())
|
||||
|
@ -33,6 +33,7 @@ public interface PurchaseOrderNoMapper extends BaseMapperX<PurchaseOrderNoDO> {
|
||||
|
||||
query.selectAll(PurchaseOrderNoDO.class)
|
||||
.select("s.name as supplierName","m.project_material_plan_no as materialPlanNo")
|
||||
.select("u1.nickname as submitUserName")
|
||||
.select("CASE " +
|
||||
" WHEN COUNT(d.id) = 0 THEN 1 " + // 无子记录
|
||||
" WHEN SUM(CASE d.receiving_status WHEN 3 THEN 0 ELSE 1 END) = 0 THEN 3 " + // 全部为3
|
||||
@ -43,6 +44,7 @@ public interface PurchaseOrderNoMapper extends BaseMapperX<PurchaseOrderNoDO> {
|
||||
.leftJoin(PurchaseOrderNoDetailDO.class,"d", PurchaseOrderNoDetailDO::getPurchaseOrderId, PurchaseOrderNoDO::getId)
|
||||
.leftJoin(MaterialPlanDO.class, "m", MaterialPlanDO::getId, PurchaseOrderNoDO::getProjectMaterialPlanId)
|
||||
.leftJoin(AdminUserDO.class,"u", AdminUserDO::getId, PurchaseOrderNoDetailDO::getDuEmpId)
|
||||
.leftJoin(AdminUserDO.class,"u1", AdminUserDO::getId, PurchaseOrderNoDO::getCreator)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(PurchaseOrderNoDO::getId)
|
||||
.orderByDesc(PurchaseOrderNoDO::getCreateTime);
|
||||
|
@ -63,9 +63,9 @@ public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNo
|
||||
|
||||
default List<PurchaseOrderNoDetailDO> getPurchaseOrderNoDetailById(Long id){
|
||||
MPJLambdaWrapper<PurchaseOrderNoDetailDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(PurchaseOrderNoDetailDO.class)
|
||||
.select("t.composition as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName","bom.blueprint_no as blueprintNo","psub.id as projectSubId")
|
||||
.select("ROUND(t.estimated_price / t.purchase_amount, 1) as unitPrice")
|
||||
.leftJoin(PurchaseOrderNoDO.class, "pb", PurchaseOrderNoDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId)
|
||||
.leftJoin(ProcessBomDetailDO.class,"bom", ProcessBomDetailDO::getId, PurchaseOrderNoDetailDO::getBoomDetailId)
|
||||
.leftJoin(MaterialPlanBoomDO.class,"plan", MaterialPlanBoomDO::getId, PurchaseOrderNoDetailDO::getProjectMaterialPlanBoomId)
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.storage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
@ -17,6 +18,7 @@ import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@ -93,4 +95,6 @@ public interface StorageMapper extends BaseMapperX<StorageDO> {
|
||||
.ne(StorageDO::getStatus,3);
|
||||
return selectList(query);
|
||||
}
|
||||
|
||||
BigDecimal StandardPartsCost(@Param("id") Long id, @Param("projectSubId") Long projectSubId);
|
||||
}
|
@ -111,6 +111,7 @@ public interface StorageMatMapper extends BaseMapperX<StorageMatDO> {
|
||||
query.selectAll(StorageMatDO.class)
|
||||
.select("o.project_name as projectName ,l.name as matName ,l.material_type as matType,l.spec as matSpec,d.label as matUnit")
|
||||
.select("w.price as unitPrice,ROUND(COALESCE(t.storage_ok_qty * w.price, 0), 1) AS totalPrice")
|
||||
.select("l.code as matCode")
|
||||
.leftJoin(MaterialDO.class,"l",MaterialDO::getId,StorageMatDO::getMatId)
|
||||
.leftJoin(DictDataDO.class,"d",DictDataDO::getValue, MaterialDO::getUnit)
|
||||
.leftJoin("wms_storage_inventory w on t.wh_id=w.wh_id and t.rg_id=w.rg_id and t.pn_id=w.pn_id and t.mat_id=w.material_id and w.tenant_id=2 and w.deleted=0")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
@ -10,11 +11,13 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDis
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.ygjx.vo.YgjxPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
@ -297,7 +300,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
default PageResult<TaskDispatchDetailDO> selectPageWx(TaskDispatchDetailPageReqVO reqVO , Set<String> postIds) {
|
||||
default PageResult<TaskDispatchDetailDO> selectPageWx(TaskDispatchDetailPageReqVO reqVO , Map<String, Long> postIds) {
|
||||
// 假设reqVO中包含了页码(page)和每页数量(limit)
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(TaskDispatchDetailDO.class)
|
||||
@ -313,39 +316,53 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
.leftJoin(ProcessBomDetailDO.class, "d", ProcessBomDetailDO::getId, TaskDispatchDO::getBomDetailId)
|
||||
.leftJoin(ProcedureDO.class, "e", ProcedureDO::getId, TaskDispatchDetailDO::getProcedureId)
|
||||
.leftJoin(TaskReportDO.class, "f", TaskReportDO::getDispatchDetailId, TaskDispatchDetailDO::getId)
|
||||
.ne(ProjectOrderDO::getStatus,6)
|
||||
.groupBy(TaskDispatchDetailDO::getId)
|
||||
.disableSubLogicDel();
|
||||
.disableSubLogicDel();;
|
||||
if (reqVO.getProcedureStatusList().size() == 1 && reqVO.getProcedureStatusList().get(0) == 2) {
|
||||
// 完工降序
|
||||
query.orderByDesc(TaskDispatchDetailDO::getDispatchId, TaskDispatchDetailDO::getSort);
|
||||
} else {
|
||||
// 未完工升序
|
||||
query.eq(TaskDispatchDO::getDispatchStatus, 2)
|
||||
.orderByAsc(TaskDispatchDetailDO::getDispatchId, TaskDispatchDetailDO::getSort);
|
||||
}
|
||||
|
||||
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
|
||||
query.apply("(b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
|
||||
query.and( e ->e.like(ProjectOrderDO::getProjectName, reqVO.getSubOrDetailName()).or().like(
|
||||
ProjectOrderSubDO::getName, reqVO.getSubOrDetailName()
|
||||
).or().like(ProcessBomDetailDO::getMaterialName, reqVO.getSubOrDetailName()));
|
||||
// query.eq(" (b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
|
||||
}
|
||||
if (reqVO.getProcedureStatusList().size()==1 && reqVO.getProcedureStatusList().get(0)==2){
|
||||
//完工降序
|
||||
query.orderByDesc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort);
|
||||
}else {
|
||||
//未完工升序
|
||||
query.and(wrapper -> {
|
||||
wrapper.ne(ProjectOrderDO::getStatus,6);
|
||||
|
||||
query.eq(TaskDispatchDO::getDispatchStatus,2)
|
||||
.orderByAsc(TaskDispatchDetailDO::getDispatchId,TaskDispatchDetailDO::getSort)
|
||||
;
|
||||
}
|
||||
if (CollUtil.isNotEmpty(postIds)) {
|
||||
query.and(i -> i
|
||||
.and(j -> j.in(TaskDispatchDetailDO::getPostId, postIds))
|
||||
.and(j -> j.isNull(TaskDispatchDetailDO::getOwner))
|
||||
.or(k-> k.eq(reqVO.getOwner() != null, TaskDispatchDetailDO::getOwner, reqVO.getOwner()))
|
||||
);
|
||||
}else{
|
||||
query.eq(reqVO.getOwner() != null, TaskDispatchDetailDO::getOwner, reqVO.getOwner());
|
||||
wrapper.and(i -> {
|
||||
// 为每个岗位创建对应的工序查询条件
|
||||
for (String postId : postIds.keySet()) {
|
||||
Long processId = postIds.get(postId);
|
||||
if (ObjectUtil.isNotEmpty(processId)) {
|
||||
i.or(j -> j.eq(TaskDispatchDetailDO::getPostId, postId)
|
||||
.eq(TaskDispatchDetailDO::getProcedureId, processId)
|
||||
.isNull(TaskDispatchDetailDO::getOwner));
|
||||
} else {
|
||||
i.or(j -> j.eq(TaskDispatchDetailDO::getPostId, postId)
|
||||
.isNull(TaskDispatchDetailDO::getOwner));
|
||||
}
|
||||
}
|
||||
});
|
||||
// 添加所有者查询条件
|
||||
wrapper.or(k -> k.eq(reqVO.getOwner() != null, TaskDispatchDetailDO::getOwner, reqVO.getOwner()));
|
||||
} else {
|
||||
wrapper.eq(reqVO.getOwner() != null, TaskDispatchDetailDO::getOwner, reqVO.getOwner());
|
||||
}
|
||||
|
||||
query
|
||||
.in(CollUtil.isNotEmpty(reqVO.getProcedureStatusList()), TaskDispatchDetailDO::getProcedureStatus, reqVO.getProcedureStatusList())
|
||||
});
|
||||
query.in(CollUtil.isNotEmpty(reqVO.getProcedureStatusList()), TaskDispatchDetailDO::getProcedureStatus, reqVO.getProcedureStatusList())
|
||||
.eq(reqVO.getIsReport() != null, ProcedureDO::getIsReport, reqVO.getIsReport())
|
||||
.eq(!StringUtils.isEmpty(reqVO.getDispatchType()), TaskDispatchDO::getDispatchType, reqVO.getDispatchType())
|
||||
.eq(reqVO.getTaskId() != null, TaskDispatchDO::getTaskId, reqVO.getTaskId())
|
||||
.eq(reqVO.getBomDetailId() != null, TaskDispatchDO::getBomDetailId, reqVO.getBomDetailId())
|
||||
;
|
||||
.eq(reqVO.getBomDetailId() != null, TaskDispatchDO::getBomDetailId, reqVO.getBomDetailId());
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
@ -354,8 +371,18 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
query.selectAll(TaskDispatchDetailDO.class)
|
||||
.select("a.is_report as is_report,a.code as procedure_code")
|
||||
.select("count(b.amount) as numAmount")
|
||||
.select("sum(CASE WHEN b.work_type = 1 THEN b.work_time ELSE 0 END) as workingHours")
|
||||
// .select("sum(bg.work_time) as bgWorkTime")
|
||||
.select("(SELECT SUM(bg.work_time) \n" +
|
||||
" FROM quality_pg_master_line p\n" +
|
||||
" LEFT JOIN quality_bg_master_line bg ON bg.zj_mx_id = p.id and p.deleted = 0 AND p.tenant_id = 2\n" +
|
||||
" WHERE p.dispatch_detail_id = t.id) AS bgWorkTime")
|
||||
.leftJoin(ProcedureDO.class,"a",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId)
|
||||
.leftJoin(TaskReportDO.class,"b",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
||||
// .leftJoin(PgMasterLineDO.class,"p",PgMasterLineDO::getDispatchDetailId,TaskDispatchDetailDO::getId)
|
||||
// .leftJoin("quality_pg_master_line p on p.dispatch_detail_id=t.id and p.deleted=0")
|
||||
// .leftJoin("quality_bg_master_line bg on bg.zj_mx_id = p.id and bg.deleted=0")
|
||||
// .leftJoin(BgMasterLineDO.class,"bg",BgMasterLineDO::getZjMxId,PgMasterLineDO::getId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(TaskDispatchDetailDO::getId)
|
||||
.eq(TaskDispatchDetailDO::getDispatchId, dispatchId);
|
||||
@ -694,6 +721,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
.select("d.material_name as materialName,DATE_FORMAT(p.boom_arrive_date, '%Y-%m-%d') AS boomArriveDates")
|
||||
.select("e.brief as customerName,u.nickname as nickname,c.id as projectSubId")
|
||||
.select("p.boom_arrive_date as boomArriveDate,p.du_emp_id as duEmpId,p.description as description,p.mat_weight as matWeight")
|
||||
.select("d.blueprint_no as blueprintNo")
|
||||
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)
|
||||
.leftJoin(ProjectOrderDO.class, "b", ProjectOrderDO::getId, TaskDispatchDO::getProjectId)
|
||||
.leftJoin(ProjectOrderSubDO.class, "c", ProjectOrderSubDO::getId, TaskDispatchDO::getProjectSubId)
|
||||
@ -710,6 +738,7 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
|
||||
query
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectCode()), ProjectOrderDO::getCode, pageReqVO.getProjectCode())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getBlueprintNo()), ProcessBomDetailDO::getBlueprintNo, pageReqVO.getBlueprintNo())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectName()), ProjectOrderDO::getProjectName, pageReqVO.getProjectName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectSubName()), ProjectOrderSubDO::getName, pageReqVO.getProjectSubName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, pageReqVO.getMaterialName())
|
||||
@ -718,4 +747,16 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
|
||||
.eq( TaskDispatchDetailDO::getIsOutsourcing, "Y");
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
||||
|
||||
default List<TaskDispatchDetailDO> getByBoomId(Long id){
|
||||
MPJLambdaWrapper<TaskDispatchDetailDO> wrapper = new MPJLambdaWrapper<>();
|
||||
wrapper.selectAll(TaskDispatchDetailDO.class)
|
||||
.select("b.name as procedureName")
|
||||
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)
|
||||
.leftJoin(ProcedureDO.class, "b", ProcedureDO::getId, TaskDispatchDetailDO::getProcedureId)
|
||||
.groupBy(TaskDispatchDetailDO::getId);
|
||||
wrapper.eq(TaskDispatchDO::getBomDetailId, id);
|
||||
return selectList(wrapper);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
|
@ -58,11 +58,11 @@ public interface TaskReportMapper extends BaseMapperX<TaskReportDO> {
|
||||
.like(!StringUtils.isEmpty(reqVO.getMaterialName()), ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getOwnerName()), AdminUserDO::getNickname, reqVO.getOwnerName())
|
||||
.eq(!StringUtils.isEmpty(reqVO.getDispatchDetailId()),TaskReportDO::getDispatchDetailId,reqVO.getDispatchDetailId());
|
||||
if (reqVO.getStartTime() != null) {
|
||||
query.between( TaskReportDO::getStartTime, reqVO.getStartTime()[0], reqVO.getStartTime()[1]);
|
||||
}
|
||||
if (reqVO.getStartTime() != null) {
|
||||
query.between(TaskReportDO::getEndTime, reqVO.getEndTime()[0], reqVO.getEndTime()[1]);
|
||||
// if (reqVO.getStartTime() != null) {
|
||||
// query.between( TaskReportDO::getStartTime, reqVO.getStartTime()[0], reqVO.getStartTime()[1]);
|
||||
// }
|
||||
if (reqVO.getEndTime() != null) {
|
||||
query.between(TaskReportDO::getReportTime, reqVO.getEndTime()[0], reqVO.getEndTime()[1]);
|
||||
}
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.QualityStatistics;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
@ -15,8 +17,12 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.U
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 品质异常通知单审核 Mapper
|
||||
*
|
||||
@ -68,6 +74,15 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
UnqualifiedNotificationDO selectWxById(Map map);
|
||||
Long selectCountPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<UnqualifiedNotificationDO> selectPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
default UnqualifiedNotificationDO selectById(Long id) {
|
||||
MPJLambdaWrapper<UnqualifiedNotificationDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(UnqualifiedNotificationDO.class)
|
||||
@ -119,4 +134,16 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
List<QualityStatistics> QualityStatistics(@Param("page") Page<QualityStatistics> page, @Param("pageReqVO") UnqualifiedNotificationPageReqVO pageReqVO);
|
||||
|
||||
Long selectCountConfirmPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit,
|
||||
@Param("userId") Integer userId);
|
||||
|
||||
List<UnqualifiedNotificationDO> selectConfirmPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit,
|
||||
@Param("userId") Integer userId);
|
||||
}
|
||||
|
@ -18,9 +18,10 @@ import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UnqualifiedNotificationFileMapper extends BaseMapperX<UnqualifiedNotificationFileDO> {
|
||||
default List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualifiedId){
|
||||
default List<UnqualifiedNotificationFileDO> queryUnqualifiedNotificationFileBySuperId(Long unqualifiedId,Integer type){
|
||||
MPJLambdaWrapper<UnqualifiedNotificationFileDO> query = new MPJLambdaWrapper<>();
|
||||
query.eq(UnqualifiedNotificationFileDO::getUnqualifiedId,unqualifiedId);
|
||||
query.eq(UnqualifiedNotificationFileDO::getUnqualifiedId,unqualifiedId)
|
||||
.eq(UnqualifiedNotificationFileDO::getType,type);
|
||||
return selectList(query);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public interface ZjBgMasterLineMapper extends BaseMapperX<ZjBgMasterLineDO> {
|
||||
.orderByDesc(ZjBgMasterLineDO::getId));*/
|
||||
}
|
||||
|
||||
default ZjBgMasterLineDO selectSum(Integer zjMxId) {
|
||||
default ZjBgMasterLineDO selectSum(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
query.select("SUM(t.amount) as amount ,SUM(t.work_time) as workTime");
|
||||
|
||||
@ -54,15 +54,25 @@ public interface ZjBgMasterLineMapper extends BaseMapperX<ZjBgMasterLineDO> {
|
||||
return selectOne(query);
|
||||
}
|
||||
|
||||
default ZjBgMasterLineDO selectEnd(Integer zjMxId) {
|
||||
default ZjBgMasterLineDO selectEnd(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.isNull(BgMasterLineDO::getAmount)
|
||||
query.eq( ZjBgMasterLineDO::getZjMxId, zjMxId)
|
||||
.isNull(ZjBgMasterLineDO::getAmount)
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
default ZjBgMasterLineDO selectLast(Long zjMxId) {
|
||||
MPJLambdaWrapper<ZjBgMasterLineDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
|
||||
query.eq( BgMasterLineDO::getZjMxId, zjMxId)
|
||||
.orderByDesc(ZjBgMasterLineDO::getId)
|
||||
.last("limit 1");
|
||||
;
|
||||
|
||||
return selectOne(query);
|
||||
}
|
||||
}
|
@ -118,7 +118,12 @@ public interface ZjPgMasterLineMapper extends BaseMapperX<ZjPgMasterLineDO> {
|
||||
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
|
||||
;
|
||||
|
||||
if (reqVO.getSubOrDetailName() != null && !reqVO.getSubOrDetailName().trim().equals("")){
|
||||
query.and( e ->e.like(ZjPgMasterLineDO::getProjectName, reqVO.getSubOrDetailName()).or().like(
|
||||
ZjPgMasterLineDO::getProjectSubName, reqVO.getSubOrDetailName()
|
||||
));
|
||||
// query.eq(" (b.project_name like '%" + reqVO.getSubOrDetailName() + "%' or c.name like '%" + reqVO.getSubOrDetailName() + "%')");
|
||||
}
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
default int deleteByZlPgId(Integer zlPgId) {
|
||||
|
@ -584,7 +584,7 @@ public class CrossOrderManager {
|
||||
.setBomDetailId(planTaskBomDO.getBomDetailId())
|
||||
.setBomBlueprintNo(planTaskBomDO.getBomBlueprintNo() == null ?"":planTaskBomDO.getBomBlueprintNo())
|
||||
.setActive(OperateTypeEnum.SAVE.name())
|
||||
.setDispatchStatus(TaskDispatchStatusEnum.SAVE.getCode())
|
||||
.setDispatchStatus(TaskDispatchStatusEnum.Unedited.getCode())
|
||||
.setStatus(ValidStatusEnum.VALID.getCode());
|
||||
taskDispatchService.createTaskDispatch(taskDispatchSaveReqVO);
|
||||
}
|
||||
@ -617,7 +617,7 @@ public class CrossOrderManager {
|
||||
.setBomBlueprintNo(planTaskBomDO.getBomBlueprintNo() == null ?"":planTaskBomDO.getBomBlueprintNo())
|
||||
.setBomDetailId(planTaskBomDO.getBomDetailId())
|
||||
.setActive(OperateTypeEnum.SAVE.name())
|
||||
.setDispatchStatus(TaskDispatchStatusEnum.SAVE.getCode())
|
||||
.setDispatchStatus(TaskDispatchStatusEnum.Unedited.getCode())
|
||||
.setStatus(ValidStatusEnum.VALID.getCode());
|
||||
taskDispatchService.createTaskDispatch(taskDispatchSaveReqVO);
|
||||
});
|
||||
|
@ -865,7 +865,7 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService {
|
||||
BdgzsomthingDO.setThingname(attentiontodoRespVO.getEvent());//事件名称
|
||||
BdgzsomthingDO.setAttr4("0");//是否点击
|
||||
BdgzsomthingDO.setThings("计划单号:"+materialPlanBoomDO.getProjectMaterialPlanNo()+" 加工件:"+materialPlanBoomDO.getName()+",临近到货日期");//事件名称
|
||||
BdgzsomthingDO.setAttr2(null);//因为不用跳转所以为null
|
||||
BdgzsomthingDO.setAttr2(String.valueOf(materialPlanBoomDO.getId()));//因为不用跳转所以为null
|
||||
BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期
|
||||
BdgzsomthingDO.setTenantId(attentiontodoRespVO.getTxrid());
|
||||
// BdgzsomthingDO.setShowname(LocalDateTime.now());//比较创建时间,不用单独填写
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user