统计单元信息修改

master
zhouhy 1 year ago
parent aba7eecea3
commit 8e06982e54

@ -74,9 +74,9 @@ spring:
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
@ -100,7 +100,7 @@ spring:
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
webStatFilter:
enabled: true
statViewServlet:
enabled: true
@ -119,4 +119,4 @@ spring:
merge-sql: true
wall:
config:
multi-statement-allow: true
multi-statement-allow: true

@ -4,7 +4,9 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.aucma.base.domain.BaseMonitorInfo;
import com.aucma.base.domain.BaseProductLine;
import com.aucma.base.domain.TreeSelects;
import com.aucma.base.service.IBaseProductLineService;
import com.aucma.common.utils.DateUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@ -35,6 +37,8 @@ import com.aucma.common.utils.poi.ExcelUtil;
public class BaseWorkUnitController extends BaseController {
@Autowired
private IBaseWorkUnitService baseWorkUnitService;
@Autowired
private IBaseProductLineService baseProductLineService;
/**
*
@ -43,6 +47,14 @@ public class BaseWorkUnitController extends BaseController {
@GetMapping("/list" )
public AjaxResult list(BaseWorkUnit baseWorkUnit) {
List<BaseWorkUnit> list = baseWorkUnitService.selectBaseWorkUnitList(baseWorkUnit);
BaseProductLine baseProductLine = new BaseProductLine();
for (int i=0;i<list.size();i++){
if (list.get(i).getProductLineCode()!=null){
baseProductLine.setProductLineCode(list.get(i).getProductLineCode());
list.get(i).setProductLineName(baseProductLineService.selectBaseProductLineList(baseProductLine).get(0).getProductLineName());
}
}
return success(list);
}
/**

@ -45,7 +45,17 @@ private static final long serialVersionUID=1L;
@Excel(name = "产线/工位")
private String productLineCode;
/** 统计单元类型 */
private String productLineName;
public String getProductLineName() {
return productLineName;
}
public void setProductLineName(String productLineName) {
this.productLineName = productLineName;
}
/** 统计单元类型 */
@Excel(name = "统计单元类型")
private Long workUnitType;
@ -229,23 +239,27 @@ private static final long serialVersionUID=1L;
return updatedTime;
}
@Override
public String toString(){
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objId",getObjId())
.append("workUnitCode",getWorkUnitCode())
.append("parentId",getParentId())
.append("workUnitName",getWorkUnitName())
.append("workUnitAddress",getWorkUnitAddress())
.append("ancestors",getAncestors())
.append("workUnitSort",getWorkUnitSort())
.append("productLineCode",getProductLineCode())
.append("workUnitType",getWorkUnitType())
.append("isFlag",getIsFlag())
.append("createdBy",getCreatedBy())
.append("createdTime",getCreatedTime())
.append("updatedBy",getUpdatedBy())
.append("updatedTime",getUpdatedTime())
.toString();
}
@Override
public String toString() {
return "BaseWorkUnit{" +
"objId=" + objId +
", workUnitCode='" + workUnitCode + '\'' +
", workUnitName='" + workUnitName + '\'' +
", workUnitAddress='" + workUnitAddress + '\'' +
", workUnitSort=" + workUnitSort +
", productLineCode='" + productLineCode + '\'' +
", productLineName='" + productLineName + '\'' +
", workUnitType=" + workUnitType +
", isFlag=" + isFlag +
", createdBy='" + createdBy + '\'' +
", createdTime=" + createdTime +
", updatedBy='" + updatedBy + '\'' +
", updatedTime=" + updatedTime +
", children=" + children +
", parentName='" + parentName + '\'' +
", parentId=" + parentId +
", orderNum=" + orderNum +
", ancestors='" + ancestors + '\'' +
'}';
}
}

@ -13,6 +13,7 @@
<result property="ancestors" column="ancestors" />
<result property="workUnitSort" column="work_unit_sort" />
<result property="productLineCode" column="product_line_code" />
<result property="productLineName" column="product_line_name" />
<result property="workUnitType" column="work_unit_type" />
<result property="isFlag" column="is_flag" />
<result property="createdBy" column="created_by" />

Loading…
Cancel
Save