Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7e1ab7b6a8
|
|
@ -31,6 +31,10 @@ public enum TaskStatusEnum {
|
||||||
* 维修进行中
|
* 维修进行中
|
||||||
*/
|
*/
|
||||||
REPAIRING("43", "维修进行中"),
|
REPAIRING("43", "维修进行中"),
|
||||||
|
/**
|
||||||
|
* 维修待进行
|
||||||
|
*/
|
||||||
|
REPAIRPENDING("42", "维修待进行"),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 待报废任务--待审核
|
* 待报废任务--待审核
|
||||||
|
|
|
||||||
|
|
@ -223,14 +223,14 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
throw new RuntimeException("input_apply_details");
|
throw new RuntimeException("input_apply_details");
|
||||||
}
|
}
|
||||||
// 如果是成套的机具,成套机具的库存也要添加
|
// 如果是成套的机具,成套机具的库存也要添加
|
||||||
List<BackApplyInfo> ctList = backReceiveMapper.getCtList(record);
|
// List<BackApplyInfo> ctList = backReceiveMapper.getCtList(record);
|
||||||
if (ctList.size() > 0) {
|
// if (ctList.size() > 0) {
|
||||||
for (BackApplyInfo backApplyInfo : ctList) {
|
// for (BackApplyInfo backApplyInfo : ctList) {
|
||||||
if ("2".equals(backApplyInfo.getManageType())) {
|
// if ("2".equals(backApplyInfo.getManageType())) {
|
||||||
backReceiveMapper.updateMt(backApplyInfo);
|
// backReceiveMapper.updateMt(backApplyInfo);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
res = updateMt(hgList);
|
res = updateMt(hgList);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("ma_type");
|
throw new RuntimeException("ma_type");
|
||||||
|
|
@ -493,8 +493,8 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
applyInfo.setTaskType(Integer.valueOf(taskType));
|
applyInfo.setTaskType(Integer.valueOf(taskType));
|
||||||
String taskStatus = "";
|
String taskStatus = "";
|
||||||
if (TaskTypeEnum.MAINTENANCE_TASK.getCode().equals(taskType)) {
|
if (TaskTypeEnum.MAINTENANCE_TASK.getCode().equals(taskType)) {
|
||||||
//taskStatus = "43";
|
//taskStatus = "42";
|
||||||
taskStatus = TaskStatusEnum.REPAIRING.getCode();
|
taskStatus = TaskStatusEnum.REPAIRPENDING.getCode();
|
||||||
}
|
}
|
||||||
if (TaskTypeEnum.SCRAP_TASK.getCode().equals(taskType)) {
|
if (TaskTypeEnum.SCRAP_TASK.getCode().equals(taskType)) {
|
||||||
//taskStatus = "120";
|
//taskStatus = "120";
|
||||||
|
|
|
||||||
|
|
@ -268,6 +268,12 @@ public class MaTypeController extends BaseController {
|
||||||
@Log(title = "机具类型管理ma_type", businessType = BusinessType.UPDATE)
|
@Log(title = "机具类型管理ma_type", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody MaType maType) {
|
public AjaxResult edit(@RequestBody MaType maType) {
|
||||||
|
Long parentId = maType.getParentId();
|
||||||
|
List<MaType> subMas = maTypeMapper.getListByParentId(parentId, null);
|
||||||
|
boolean containsSameBrother = subMas.stream().anyMatch(o -> o.getTypeName().equals(maType.getTypeName()));
|
||||||
|
if (containsSameBrother) {
|
||||||
|
return AjaxResult.error("修改失败,同级存在相同名称");
|
||||||
|
}
|
||||||
return toAjax(iTypeService.updateMaType(maType));
|
return toAjax(iTypeService.updateMaType(maType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ public class MaTypeServiceImpl implements ITypeService {
|
||||||
public int insertMaType(MaType maType) {
|
public int insertMaType(MaType maType) {
|
||||||
Long parentId = maType.getParentId();
|
Long parentId = maType.getParentId();
|
||||||
List<MaType> subMas = maTypeMapper.getListByParentId(parentId, null);
|
List<MaType> subMas = maTypeMapper.getListByParentId(parentId, null);
|
||||||
boolean containsSameBrother = subMas.stream().anyMatch(o -> o.getTypeName().contains(maType.getTypeName()));
|
boolean containsSameBrother = subMas.stream().anyMatch(o -> o.getTypeName().equals(maType.getTypeName()));
|
||||||
if (containsSameBrother) {
|
if (containsSameBrother) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,10 @@ import com.bonus.sgzb.base.service.RepairService;
|
||||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.sgzb.material.domain.TmTask;
|
||||||
|
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
import com.bonus.sgzb.system.api.model.LoginUser;
|
import com.bonus.sgzb.system.api.model.LoginUser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -30,6 +31,9 @@ public class RepairServiceImpl implements RepairService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RepairMapper mapper;
|
private RepairMapper mapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TaskMapper taskMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
||||||
|
|
@ -58,6 +62,12 @@ public class RepairServiceImpl implements RepairService {
|
||||||
bean.setCreateBy(loginUser.getUserid());
|
bean.setCreateBy(loginUser.getUserid());
|
||||||
List<RepairPartDetails> partList = bean.getPartList();
|
List<RepairPartDetails> partList = bean.getPartList();
|
||||||
BigDecimal sfCosts = new BigDecimal("0");
|
BigDecimal sfCosts = new BigDecimal("0");
|
||||||
|
// 修改任务状态
|
||||||
|
TmTask tmTask = new TmTask();
|
||||||
|
tmTask.setTaskStatus(43);
|
||||||
|
tmTask.setTaskId(Long.valueOf(bean.getTaskId()));
|
||||||
|
taskMapper.updateTashStatus(tmTask);
|
||||||
|
|
||||||
String nbType = "1";
|
String nbType = "1";
|
||||||
String fcType = "2";
|
String fcType = "2";
|
||||||
String sfPart = "1";
|
String sfPart = "1";
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,14 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
@Excel(name = "采购日期")
|
@Excel(name = "采购日期")
|
||||||
private Date purchaseTime;
|
private String purchaseTime;
|
||||||
|
|
||||||
/** 到货日期 */
|
/** 到货日期 */
|
||||||
@ApiModelProperty(value = "到货日期")
|
@ApiModelProperty(value = "到货日期")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
@Excel(name = "到货日期")
|
@Excel(name = "到货日期")
|
||||||
private Date arrivalTime;
|
private String arrivalTime;
|
||||||
|
|
||||||
/** 采购员 */
|
/** 采购员 */
|
||||||
@ApiModelProperty(value = "采购员")
|
@ApiModelProperty(value = "采购员")
|
||||||
|
|
@ -167,21 +167,21 @@ public class PurchasePartInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
return taskId;
|
return taskId;
|
||||||
}
|
}
|
||||||
public void setPurchaseTime(Date purchaseTime)
|
public void setPurchaseTime(String purchaseTime)
|
||||||
{
|
{
|
||||||
this.purchaseTime = purchaseTime;
|
this.purchaseTime = purchaseTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getPurchaseTime()
|
public String getPurchaseTime()
|
||||||
{
|
{
|
||||||
return purchaseTime;
|
return purchaseTime;
|
||||||
}
|
}
|
||||||
public void setArrivalTime(Date arrivalTime)
|
public void setArrivalTime(String arrivalTime)
|
||||||
{
|
{
|
||||||
this.arrivalTime = arrivalTime;
|
this.arrivalTime = arrivalTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getArrivalTime()
|
public String getArrivalTime()
|
||||||
{
|
{
|
||||||
return arrivalTime;
|
return arrivalTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.bonus.sgzb.material.domain.CalMonthlyBean;
|
||||||
import com.bonus.sgzb.material.domain.ProjectMonthCosts;
|
import com.bonus.sgzb.material.domain.ProjectMonthCosts;
|
||||||
import com.bonus.sgzb.material.domain.ProjectMonthDetail;
|
import com.bonus.sgzb.material.domain.ProjectMonthDetail;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -41,4 +42,10 @@ public interface CalMonthlyMapper {
|
||||||
List<SltAgreementInfo> getMonthCosts(AgreementInfo agreementInfo);
|
List<SltAgreementInfo> getMonthCosts(AgreementInfo agreementInfo);
|
||||||
|
|
||||||
List<SltAgreementInfo> getMonthDetails(SltAgreementInfo monthCost);
|
List<SltAgreementInfo> getMonthDetails(SltAgreementInfo monthCost);
|
||||||
|
|
||||||
|
void deleteCostByProjectIdAndMonth(ProjectMonthCosts projectMonthCosts);
|
||||||
|
|
||||||
|
List<String> selectIdByProjectIdAndMonth(ProjectMonthCosts projectMonthCosts);
|
||||||
|
|
||||||
|
void deleteDetailsByProMonthCostId(@Param("proMonthCostId") String proMonthCostId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ public interface TaskMapper {
|
||||||
int insertSelective(TmTask bean);
|
int insertSelective(TmTask bean);
|
||||||
|
|
||||||
int insertAgreement(TmTask task);
|
int insertAgreement(TmTask task);
|
||||||
|
int updateTashStatus(TmTask task);
|
||||||
|
|
||||||
int insertTmTaskByBackInfo(BackApplyInfo backApplyInfo);
|
int insertTmTaskByBackInfo(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ public class Inform {
|
||||||
@Value("${sgzb.job.settlementJobDay}")
|
@Value("${sgzb.job.settlementJobDay}")
|
||||||
private String settlementJobDay;
|
private String settlementJobDay;
|
||||||
|
|
||||||
//@Scheduled(cron = "0 */3 * * * ? ") // 间隔3分钟执行
|
// @Scheduled(cron = "0 */5 * * * ? ") // 间隔5分钟执行
|
||||||
@Scheduled(cron = "${sgzb.job.settlementJobCron}") // 结算日次日凌晨执行
|
@Scheduled(cron = "${sgzb.job.settlementJobCron}") // 结算日次日凌晨执行
|
||||||
@Async
|
@Async
|
||||||
public void taskCycle() {
|
public void taskCycle() {
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
||||||
record.setMonth(month);
|
record.setMonth(month);
|
||||||
cleanSameMonthOldRecords(record);
|
cleanSameMonthOldRecords(record);
|
||||||
List<AgreementInfo> list = agreementInfoService.getAllAgreementId();
|
List<AgreementInfo> list = agreementInfoService.getAllAgreementId();
|
||||||
List<BmProjectLot> projectLots = agreementInfoService.getAllprojectId();
|
// List<BmProjectLot> projectLots = agreementInfoService.getAllprojectId();
|
||||||
// 如果该工程费用指标已超过,则不需要记录月结记录
|
// 如果该工程费用指标已超过,则不需要记录月结记录
|
||||||
for (BmProjectLot bmProjectLot : projectLots) {
|
/* for (BmProjectLot bmProjectLot : projectLots) {
|
||||||
BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
|
BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
|
||||||
BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
|
BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
|
||||||
if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
|
if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
|
||||||
|
|
@ -61,7 +61,7 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
||||||
List<AgreementInfo> agreementIds = agreementInfoService.getprojectIdByLotId(bmProjectLot);
|
List<AgreementInfo> agreementIds = agreementInfoService.getprojectIdByLotId(bmProjectLot);
|
||||||
agreementIds.forEach(t -> list.remove(t));
|
agreementIds.forEach(t -> list.remove(t));
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
list.forEach(t -> {
|
list.forEach(t -> {
|
||||||
t.setStartTime(startTime);
|
t.setStartTime(startTime);
|
||||||
t.setEndTime(endTime);
|
t.setEndTime(endTime);
|
||||||
|
|
@ -83,7 +83,7 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<SltAgreementInfo> addProjectMonthCosts(List<AgreementInfo> list, CalMonthlyBean record) {
|
private void addProjectMonthCosts(List<AgreementInfo> list, CalMonthlyBean record) {
|
||||||
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
List<SltAgreementInfo> leaseList = new ArrayList<>();
|
||||||
calMonthlyMapper.insertCalcRecord(record);
|
calMonthlyMapper.insertCalcRecord(record);
|
||||||
String taskId = record.getId();
|
String taskId = record.getId();
|
||||||
|
|
@ -112,15 +112,29 @@ public class CalcMonthlyServiceImp implements CalcMonthlyService {
|
||||||
agreementInfo.setIds(sltAgreementInfo.getIds());
|
agreementInfo.setIds(sltAgreementInfo.getIds());
|
||||||
sltAgreementInfo.setMonth(bean.getMonth());
|
sltAgreementInfo.setMonth(bean.getMonth());
|
||||||
agreementInfo.setEndTime(sltAgreementInfo.getOffTime());
|
agreementInfo.setEndTime(sltAgreementInfo.getOffTime());
|
||||||
List<SltAgreementInfo> leaseListOneMonth = addProjectMonthDetail(agreementInfo, sltAgreementInfo, pmcId);
|
// 新增project_month_detail
|
||||||
|
addProjectMonthDetail(agreementInfo, sltAgreementInfo, pmcId);
|
||||||
projectMonthCosts.setCosts(sltAgreementInfo.getCosts());
|
projectMonthCosts.setCosts(sltAgreementInfo.getCosts());
|
||||||
calMonthlyMapper.updateProMonCosts(projectMonthCosts);
|
calMonthlyMapper.updateProMonCosts(projectMonthCosts);
|
||||||
sltAgreementInfo.setNode(leaseListOneMonth);
|
|
||||||
}
|
// 如果该工程费用指标已超过,则不需要记录月结记录
|
||||||
leaseList.addAll(monthList);
|
BmProjectLot bmProjectLot = new BmProjectLot();
|
||||||
|
bmProjectLot.setLotId(projectMonthCosts.getProjectId());
|
||||||
|
// 获取已结算金额
|
||||||
|
BigDecimal costByLotId = agreementInfoService.getCostByLotId(bmProjectLot);
|
||||||
|
// 获取该工程费用指标
|
||||||
|
BigDecimal costIndicatorsByLotId = agreementInfoService.getCostIndicatorsByLotId(bmProjectLot);
|
||||||
|
if (costByLotId.compareTo(costIndicatorsByLotId) > 0) {
|
||||||
|
List<String> proMonthCostIds = calMonthlyMapper.selectIdByProjectIdAndMonth(projectMonthCosts);
|
||||||
|
calMonthlyMapper.deleteCostByProjectIdAndMonth(projectMonthCosts);
|
||||||
|
for (String proMonthCostId : proMonthCostIds) {
|
||||||
|
calMonthlyMapper.deleteDetailsByProMonthCostId(proMonthCostId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return leaseList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,9 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
||||||
purchaseCheckDetails.setStatus(2);
|
purchaseCheckDetails.setStatus(2);
|
||||||
}
|
}
|
||||||
purchaseCheckDetails.setUpdateTime(DateUtils.getNowDate());
|
purchaseCheckDetails.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
if ("1".equals(purchaseCheckDetails.getManageType())){
|
||||||
|
purchaseCheckDetails.setBindNum(purchaseCheckDetails.getCheckNum());
|
||||||
|
}
|
||||||
purchaseCheckDetailsMapper.updatePurchaseCheckDetails(purchaseCheckDetails);
|
purchaseCheckDetailsMapper.updatePurchaseCheckDetails(purchaseCheckDetails);
|
||||||
}
|
}
|
||||||
//判断是否全部已操作(不通过或通过)
|
//判断是否全部已操作(不通过或通过)
|
||||||
|
|
|
||||||
|
|
@ -85,30 +85,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectMaPartType" parameterType="com.bonus.sgzb.base.domain.MaPartType" resultMap="MaPartTypeResult">
|
<select id="selectMaPartType" parameterType="com.bonus.sgzb.base.domain.MaPartType" resultMap="MaPartTypeResult">
|
||||||
SELECT
|
SELECT DISTINCT
|
||||||
t1.pa_id,
|
t1.pa_id,
|
||||||
t1.pa_name,
|
t1.pa_name,
|
||||||
t1.parent_id,
|
t1.parent_id,
|
||||||
t1.status,
|
t1.STATUS,
|
||||||
t1.num,
|
t1.num,
|
||||||
t1.unit_id,
|
t1.unit_id,
|
||||||
t1.buy_price,
|
t1.buy_price,
|
||||||
t1.level,
|
t1.LEVEL,
|
||||||
t1.warn_num,
|
t1.warn_num,
|
||||||
t1.del_flag,
|
t1.del_flag,
|
||||||
t1.create_by,
|
t1.create_by,
|
||||||
t1.create_time,
|
t1.create_time,
|
||||||
t1.remark,
|
t1.remark,
|
||||||
t1.company_id,
|
t1.company_id,
|
||||||
t1.year
|
t1.YEAR
|
||||||
FROM
|
FROM
|
||||||
ma_part_type t1
|
ma_part_type t1
|
||||||
LEFT JOIN
|
LEFT JOIN ma_part_type t2 ON t1.parent_id = t2.pa_id
|
||||||
ma_part_type t2 ON t1.parent_id = t2.pa_id
|
LEFT JOIN ma_part_type t3 ON t2.parent_id = t3.pa_id
|
||||||
LEFT JOIN
|
|
||||||
ma_part_type t3 ON t2.parent_id = t3.pa_id
|
|
||||||
WHERE
|
WHERE
|
||||||
t1.del_flag = '0'
|
t1.del_flag = '0' and t1.pa_id is not null
|
||||||
<if test="paName != null and paName != ''">
|
<if test="paName != null and paName != ''">
|
||||||
AND (t1.pa_name LIKE CONCAT('%', #{paName}, '%')
|
AND (t1.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
OR t2.pa_name LIKE CONCAT('%', #{paName}, '%')
|
OR t2.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
|
|
@ -117,7 +115,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="year != null and year != ''">
|
<if test="year != null and year != ''">
|
||||||
AND t1.year = #{year}
|
AND t1.year = #{year}
|
||||||
</if>
|
</if>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
t2.pa_id,
|
||||||
|
t2.pa_name,
|
||||||
|
t2.parent_id,
|
||||||
|
t2.STATUS,
|
||||||
|
t2.num,
|
||||||
|
t2.unit_id,
|
||||||
|
t2.buy_price,
|
||||||
|
t2.LEVEL,
|
||||||
|
t2.warn_num,
|
||||||
|
t2.del_flag,
|
||||||
|
t2.create_by,
|
||||||
|
t2.create_time,
|
||||||
|
t2.remark,
|
||||||
|
t2.company_id,
|
||||||
|
t2.YEAR
|
||||||
|
FROM
|
||||||
|
ma_part_type t1
|
||||||
|
LEFT JOIN ma_part_type t2 ON t1.parent_id = t2.pa_id
|
||||||
|
LEFT JOIN ma_part_type t3 ON t2.parent_id = t3.pa_id
|
||||||
|
WHERE
|
||||||
|
t2.del_flag = '0' and t2.pa_id is not null
|
||||||
|
<if test="paName != null and paName != ''">
|
||||||
|
AND (t1.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
|
OR t2.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
|
OR t3.pa_name LIKE CONCAT('%', #{paName}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="year != null and year != ''">
|
||||||
|
AND t2.year = #{year}
|
||||||
|
</if>
|
||||||
|
UNION
|
||||||
|
SELECT
|
||||||
|
t3.pa_id,
|
||||||
|
t3.pa_name,
|
||||||
|
t3.parent_id,
|
||||||
|
t3.STATUS,
|
||||||
|
t3.num,
|
||||||
|
t3.unit_id,
|
||||||
|
t3.buy_price,
|
||||||
|
t3.LEVEL,
|
||||||
|
t3.warn_num,
|
||||||
|
t3.del_flag,
|
||||||
|
t3.create_by,
|
||||||
|
t3.create_time,
|
||||||
|
t3.remark,
|
||||||
|
t3.company_id,
|
||||||
|
t3.YEAR
|
||||||
|
FROM
|
||||||
|
ma_part_type t1
|
||||||
|
LEFT JOIN ma_part_type t2 ON t1.parent_id = t2.pa_id
|
||||||
|
LEFT JOIN ma_part_type t3 ON t2.parent_id = t3.pa_id
|
||||||
|
WHERE
|
||||||
|
t3.del_flag = '0' and t3.pa_id is not null
|
||||||
|
<if test="paName != null and paName != ''">
|
||||||
|
AND (t1.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
|
OR t2.pa_name LIKE CONCAT('%', #{paName}, '%')
|
||||||
|
OR t3.pa_name LIKE CONCAT('%', #{paName}, '%'))
|
||||||
|
</if>
|
||||||
|
<if test="year != null and year != ''">
|
||||||
|
AND t3.year = #{year}
|
||||||
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE
|
WHERE
|
||||||
pmc.id = #{id}
|
pmc.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectIdByProjectIdAndMonth" resultType="java.lang.String">
|
||||||
|
select id from project_month_costs
|
||||||
|
where project_id = #{projectId} and month = #{month}
|
||||||
|
</select>
|
||||||
|
|
||||||
<delete id="deleteCalcRecord" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
<delete id="deleteCalcRecord" parameterType="com.bonus.sgzb.material.domain.CalMonthlyBean">
|
||||||
delete from slt_project_month
|
delete from slt_project_month
|
||||||
|
|
@ -95,5 +99,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
delete from project_month_costs
|
delete from project_month_costs
|
||||||
where task_id = #{id}
|
where task_id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteCostByProjectIdAndMonth">
|
||||||
|
delete from project_month_costs
|
||||||
|
where project_id = #{projectId} and month = #{month}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteDetailsByProMonthCostId">
|
||||||
|
delete from project_month_detail
|
||||||
|
where pro_month_cost_id = #{proMonthCostId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -115,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
|
<if test="purchasePrice != null">purchase_price = #{purchasePrice},</if>
|
||||||
<if test="purchaseNum != null">purchase_num = #{purchaseNum},</if>
|
<if test="purchaseNum != null">purchase_num = #{purchaseNum},</if>
|
||||||
<if test="checkNum != null">check_num = #{checkNum},</if>
|
<if test="checkNum != null">check_num = #{checkNum},</if>
|
||||||
|
<if test="bindNum != null">bind_num = #{bindNum},</if>
|
||||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
|
|
|
||||||
|
|
@ -211,6 +211,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
where task_id = #{taskId}
|
where task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateTashStatus">
|
||||||
|
UPDATE tm_task tt
|
||||||
|
SET tt.task_status = #{taskStatus}
|
||||||
|
WHERE
|
||||||
|
tt.task_id = #{taskId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteTmTaskByTaskId" parameterType="Long">
|
<delete id="deleteTmTaskByTaskId" parameterType="Long">
|
||||||
delete from tm_task where task_id = #{taskId}
|
delete from tm_task where task_id = #{taskId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue