Commit b56c7772 sunke

7x12的盘也放入小料架, 库存比对

1 个父辈 c418729a
......@@ -38,7 +38,6 @@ sc delete MongoDB
mongod --auth -dbpath D:\MongoDB\data --repair
mac mongo 启动:
sudo mongod -config /usr/local/etc/mongod.conf
......@@ -87,6 +86,17 @@ IP: 10.85.160.181
>> - msg: 消息
>> - data: 料盘直径,=7时升起气缸
2. 皮带线获取尺寸后,料盘到达机器人取料位置进调用,如果未扫到码,或者没等到取料位置信号亮,可以不用调用
> 地址:
>>/rest/api/qisda/device/arriveRobotLocation
>
> 参数:
>> - robotIndex=机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
>
> 返回:
>>``
2. 料盘流转位置信息更新
>地址:
......
package com.myproject.bean.qisda;
/**
* Created by sunke on 2020/3/3.
*/
public class DiffInfo {
private String reelId;
private String facility;
private String location;
private String qty;
private String diffDetails;
public String getFacility() {
if(facility == null){
return "";
}
return facility;
}
public void setFacility(String facility) {
this.facility = facility;
}
public String getReelId() {
return reelId;
}
public void setReelId(String reelId) {
this.reelId = reelId;
}
public String getLocation() {
if(location == null){
return "";
}
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getQty() {
if(qty == null){
return "";
}
return qty;
}
public String getDiffDetails() {
return diffDetails;
}
public void setDiffDetails(String diffDetails) {
this.diffDetails = diffDetails;
}
public void setQty(String qty) {
this.qty = qty;
}
public DiffInfo sameDiff(DiffInfo another){
DiffInfo sameDiff = new DiffInfo();
sameDiff.setReelId(reelId);
String diffDetails = "";
if(!getFacility().equals(another.getFacility())){
diffDetails = "Facility["+getFacility()+" != "+another.getFacility()+"]";
}
if(!getQty().equals(another.getQty())){
diffDetails = "Qty["+getQty()+" != "+another.getQty()+"]";
}
if(!getLocation().equals(another.getLocation())){
diffDetails = "Location["+getLocation()+" != "+another.getLocation()+"]";
}
if(!diffDetails.isEmpty()){
sameDiff.setDiffDetails(diffDetails);
return sameDiff;
}
return null;
}
}
......@@ -237,9 +237,9 @@ public class ShelfInfo {
}
}else if(robotIndex.equals("2")){
for(int i=1; i<= usedCount; i++){
//小料71,72,73位不分配给2号机器人
if(StorageConstants.SHEFL_TYPE.isCShelf(shelfType)){
if(i == 71 || i==72 || i== 73){
//小料70,71,72位不分配给2号机器人
if(StorageConstants.SHEFL_TYPE.isDShelf(shelfType)){
if(i==70 || i == 71 || i==72){
continue;
}
}
......
......@@ -367,7 +367,7 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
*/
public boolean needReSendToClient(){
if(isCheckOutTask() && isExecuting()){
return System.currentTimeMillis() - super.getUpdateDate().getTime() >= 30 * 1000;
return System.currentTimeMillis() - super.getUpdateDate().getTime() >= 60 * 1000;
}
return false;
}
......@@ -512,7 +512,10 @@ public class DataLog extends BaseMongoBean /*implements Comparable<DataLog>*/ {
* 是否是小料(7x8)的料
*/
public boolean isSmallReel(){
return w == 7 && h == 8;
if(w == 7){
return h == 8 || h == 12;
}
return false;
}
public boolean isCutReel() {
......
......@@ -3,9 +3,11 @@ package com.myproject.webapp.controller.qisda;
import com.csvreader.CsvReader;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.myproject.bean.json.LiteOrder;
import com.myproject.bean.json.LiteOrderItem;
import com.myproject.bean.qisda.AppendInfo;
import com.myproject.bean.qisda.DiffInfo;
import com.myproject.bean.update.Barcode;
import com.myproject.bean.update.StoragePos;
import com.myproject.bean.update.qisda.DNInfo;
......@@ -36,6 +38,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
......@@ -65,58 +68,85 @@ public class DifferentInventoryController extends BaseController {
log.info("开始比对:" + file);
List<StoragePos> posList = storagePosManager.findNotEmpty();
List<String> reelIds = new ArrayList<>();
Map<String,DiffInfo> neotelReelMap = new HashMap<>();
for (StoragePos storagePos : posList) {
reelIds.add(storagePos.getBarcode().getBarcode());
Barcode barcode = storagePos.getBarcode();
DiffInfo diffInfo = new DiffInfo();
diffInfo.setReelId(barcode.getBarcode());
diffInfo.setQty(barcode.getAmount() + "");
diffInfo.setFacility(barcode.getAppendInfo().getFacility());
diffInfo.setLocation(storagePos.getPosName());
neotelReelMap.put(barcode.getBarcode(), diffInfo);
}
List<String> qisdaReels = readQisda(file);
List<String> boxDiffReels = new ArrayList<>();
for (String reelId : reelIds) {
if(!qisdaReels.contains(reelId)){
boxDiffReels.add(reelId);
Map<String,DiffInfo> qisdaReelMap = readQisda(file);
List<DiffInfo> neotelReels = new ArrayList<>();
List<DiffInfo> sameDiffList = new ArrayList<>();
for (String reelId : neotelReelMap.keySet()) {
DiffInfo neotelInfo = neotelReelMap.get(reelId);
DiffInfo qisdaINfo = qisdaReelMap.get(reelId);
if(qisdaINfo == null){
//挚锦有数据,但佳世达没有
neotelReels.add(neotelInfo);
}else{
DiffInfo sameDiff = neotelInfo.sameDiff(qisdaINfo);
if(sameDiff != null){
//两边都有,但有字段值不一样
sameDiffList.add(sameDiff);
}
}
}
List<String> qisdaDiffReels = new ArrayList<>();
for(String reelId : qisdaReels){
if(!reelIds.contains(reelId)){
qisdaDiffReels.add(reelId);
List<DiffInfo> qisdaDiffReels = new ArrayList<>();
for(String reelId : qisdaReelMap.keySet()){
if(!neotelReelMap.containsKey(reelId)){
qisdaDiffReels.add(qisdaReelMap.get(reelId));
}
}
request.setAttribute("boxReels", boxDiffReels);
request.setAttribute("boxReels", neotelReels);
request.setAttribute("qisdaReels", qisdaDiffReels);
request.setAttribute("sameDiffList", sameDiffList);
return "qisda/diffInventory";
}
private List<String> readQisda(String filePath){
List<String> items = Lists.newArrayList();
private Map<String,DiffInfo> readQisda(String filePath){
Map<String,DiffInfo> itemMap = Maps.newHashMap();
try {
CsvReader csvRead = new CsvReader(filePath);
csvRead.setSkipEmptyRecords(true);//忽略空行
csvRead.setTrimWhitespace(true);//去除空格
csvRead.readHeaders();
int reelIDIndex = csvRead.getIndex("ReelID");
int facilityIndex = csvRead.getIndex("Facility");
int locationIndex = csvRead.getIndex("Location");
int qtyIndex = csvRead.getIndex("Location");
while(csvRead.readRecord()){
String[] lineValues = csvRead.getValues();
String reelId = lineValues[reelIDIndex];
String facility = lineValues[facilityIndex];
String location = lineValues[locationIndex];
String qty = lineValues[qtyIndex];
if(reelId.isEmpty()){
log.warn("行[reelId="+reelId + "]中为空,此行忽略");
}else{
items.add(reelId);
DiffInfo diffInfo = new DiffInfo();
diffInfo.setReelId(reelId);
diffInfo.setFacility(facility);
diffInfo.setLocation(location);
diffInfo.setQty(qty);
itemMap.put(reelId,diffInfo);
}
}
} catch (Exception e) {
log.error("读取库存CSV文件["+filePath+"]出错",e);
}
return items;
return itemMap;
}
......
......@@ -1112,11 +1112,13 @@ public class QisdaApiController extends BaseController {
if(dataLog.isCheckOutTask()){
//首盘和补料
if(!outInfo.isReelCutAction() && !outInfo.isUrgentAction()){
return "还有未完成的任务,完成后才可执行";
return "全部任务完成后才可执行";
}else{
//分盘和紧急料
AppendInfo appendInfo = dataLog.getAppendInfo();
//if(appendInfo.gethSerial().isEmpty() || hSerial)
String hserial = dataLog.getAppendInfo().gethSerial();
if(hserial.equals(hserial)){
return "当前需求单还有未完成的任务";
}
}
}
}
......
......@@ -85,13 +85,17 @@ public class QisdaDeviceController extends BaseController {
try{
String robotIndex = request.getParameter("robotIndex");
String barcodeStr = request.getParameter("barcode");
log.info("收到流水线获取料盘尺寸信息请求:robotIndex=" + robotIndex + " barcode="+barcodeStr);
log.info("料盘到达机器人["+robotIndex+"]扫码位置,开始获取["+ barcodeStr +"]的尺寸信息");
if(robotIndex == null){
return ResultBean.newErrorResult(-2, "参数错误:无robotIndex参数");
}
if(!robotIndex.equals("1") && !robotIndex.equals("2")){
return ResultBean.newErrorResult(-2, "参数错误:robotIndex参数只能为1或2");
}
//清空扫码缓存信息
updateScanTask(robotIndex, null);
Collection<CodeBean> codeBeans = dataCache.resolveCodeStr(barcodeStr);
Barcode barcode = null;
for (CodeBean codeBean : codeBeans) {
......@@ -101,13 +105,16 @@ public class QisdaDeviceController extends BaseController {
}else{
String msg = "找到多个有效的条码";
log.error(msg);
return ResultBean.newErrorResult(101, msg);
}
}
}
if(barcode == null){
String msg = "未找到有效的条码";
log.error(msg);
return ResultBean.newErrorResult(102, msg);
}
......@@ -118,22 +125,57 @@ public class QisdaDeviceController extends BaseController {
if(task == null){
String msg = "未找到待分配位置的条码["+barcode.getBarcode()+"]尺寸信息";
log.error(msg);
return ResultBean.newErrorResult(103, msg);
}
updateScanTask(robotIndex, task);
log.info("返回机器人["+robotIndex+"]barcode=["+task.getBarcode()+"]的尺寸:" + task.getW());
return ResultBean.newOkResult(task.getW() + "");
}catch(Exception e){
log.error("流水线获取尺寸信息出错",e);
return ResultBean.newErrorResult(-1,"流水线获取尺寸信息内部错误:" + e.getMessage());
}
}
/**
* 更新相机扫码任务
* @param robotIndex
* @param task
*/
private void updateScanTask(String robotIndex, DataLog task){
if(robotIndex != null){
if(robotIndex.equals("1")){
//1号位机器人
firstScanTask = task;
}else if(robotIndex.equals("2")){
secondScanTask = task;
}
log.info("返回机器人["+robotIndex+"]barcode=["+task.getBarcode()+"]的尺寸:" + task.getW());
return ResultBean.newOkResult(task.getW() + "");
}
}
}catch(Exception e){
log.error("流水线获取尺寸信息出错",e);
return ResultBean.newErrorResult(-1,"流水线获取尺寸信息内部错误:" + e.getMessage());
/**
* 相机扫码获取完尺寸后,料盘到达机器人取料位置
*/
@RequestMapping(value = "/arriveRobotLocation")
@ResponseBody
public Object arriveRobot(HttpServletRequest request){
String robotIndex = request.getParameter("robotIndex");
//更新位置任务,清空扫码任务
log.info("料盘到达机器人["+robotIndex+"]取料位置,更新位置任务,清空扫码任务");
if(robotIndex != null){
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = firstScanTask;
}else if(robotIndex.equals("2")){
secondRobotTask = secondScanTask;
}
updateScanTask(robotIndex, null);
}
return "";
}
/**
......@@ -267,7 +309,7 @@ public class QisdaDeviceController extends BaseController {
try{
String robotIndex = request.getParameter("robotIndex");
String rfid = request.getParameter("rfid");
log.info("收到机器人获取摆放位置信息请求:[robotIndex=" + robotIndex + "]rfid=" + rfid);
log.info("机器人["+robotIndex+"]获取摆放位置信息请求:rfid=" + rfid);
if(robotIndex == null){
return ResultBean.newErrorResult(-2, "参数错误:无robotIndex参数");
}
......@@ -283,13 +325,9 @@ public class QisdaDeviceController extends BaseController {
if(robotIndex != null){
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = firstScanTask;
task = firstRobotTask;
firstScanTask = null;
}else if(robotIndex.equals("2")){
secondRobotTask = secondScanTask;
task = secondRobotTask;
secondScanTask = null;
}
}
......@@ -330,7 +368,7 @@ public class QisdaDeviceController extends BaseController {
resultMap.put("rfid", shelfLoc.getRfid());
resultMap.put("rfidLoc", shelfLoc.getLoc() + "");
log.info("机器人位置信息返回:[robotIndex=" + robotIndex + "]rfid=" + shelfLoc.getRfid() + "["+shelfLoc.getLoc()+"] barcode=["+task.getBarcode()+"]尺寸"+task.getW()+"x"+task.getH());
log.info("机器人["+robotIndex+"]位置信息返回:[rfid=" + shelfLoc.getRfid() + "["+shelfLoc.getLoc()+"] barcode=["+task.getBarcode()+"]尺寸"+task.getW()+"x"+task.getH());
return ResultBean.newOkResult(resultMap);
}catch(Exception e){
......@@ -473,22 +511,34 @@ public class QisdaDeviceController extends BaseController {
String rfidLoc = request.getParameter("rfidLoc");
String barcode = request.getParameter("barcode");
if(Strings.isNotBlank(robotIndex)){
log.info("机器人["+robotIndex+"]将料盘["+barcode+"]放入料架["+rfid+"]["+rfidLoc+"]完成");
if(robotIndex.equals("1")){
//1号位机器人
firstRobotTask = null;
}else if(robotIndex.equals("2")){
secondRobotTask = null;
}
}
DataLog cacheTask = null;
if(Strings.isNotBlank(barcode)) {
cacheTask = taskService.getFinishedTask(barcode);
if (cacheTask == null) {
log.error("料盘[" + barcode + "]的任务不存在");
} else {
if(Strings.isNotBlank(robotIndex)){
if(robotIndex.equals("1") && firstRobotTask != null){
if(firstRobotTask.getBarcode().equals(barcode)){
log.info("机器人["+robotIndex+"]将料盘["+barcode+"]放入料架["+rfid+"]["+rfidLoc+"]完成,任务一致,清空机器人任务");
//1号位机器人
firstRobotTask = null;
}else{
log.info("机器人["+robotIndex+"]将料盘["+barcode+"]放入料架["+rfid+"]["+rfidLoc+"]完成,与当前任务["+firstScanTask.getBarcode()+"]不一致,不清空");
}
}else if(robotIndex.equals("2") && secondRobotTask != null){
if(secondRobotTask.getBarcode().equals(barcode)){
//1号位机器人
log.info("机器人["+robotIndex+"]将料盘["+barcode+"]放入料架["+rfid+"]["+rfidLoc+"]完成,任务一致,清空机器人任务");
secondRobotTask = null;
}else{
log.info("机器人["+robotIndex+"]将料盘["+barcode+"]放入料架["+rfid+"]["+rfidLoc+"]完成,与当前任务["+firstScanTask.getBarcode()+"]不一致,不清空");
}
}
}
reelPutInFinished(cacheTask,rfid, rfidLoc);
}
}
......@@ -576,7 +626,7 @@ public class QisdaDeviceController extends BaseController {
return ResultBean.newOkResult(resultMap);
}catch(Exception e){
log.error("上传摆放位置信息出错",e);
log.error("机器人放料完成信息出错",e);
}
return "";
......
......@@ -65,6 +65,9 @@ public class StatusController extends BaseController{
}
List<StatusBean> statusList = Lists.newArrayList();
for (String cid : cidList) {
if(cid.isEmpty()){
continue;
}
StatusBean statusBean = taskService.getStatus(cid);
if(!Strings.isNullOrEmpty(statusBean.getMsgCode())){
String localeMsg = getText("client."+statusBean.getMsgCode(),statusBean.getMsgParam(),request.getLocale(),statusBean.msg);
......
......@@ -552,6 +552,7 @@ public class StorageDataController extends BaseController {
log.info("流水线["+cids+"]获取["+rfid+"]["+code+"]的入库库位");
Map<String,Object> resultMap = Maps.newHashMap();
String okMsg = "";
String errorMsg = "";
if(Strings.isNullOrEmpty(cids)){
resultMap.put("result","101");
resultMap.put("msg","未指定料仓 cids ");
......@@ -565,8 +566,8 @@ public class StorageDataController extends BaseController {
}
if(storageList.isEmpty()){
resultMap.put("result","102");
lineMsg = "无可用的料仓";
resultMap.put("msg",lineMsg);
errorMsg = "无可用的料仓";
resultMap.put("msg",errorMsg);
}else{
Collection<CodeBean> codeBeans = dataCache.resolveCodeStr(code);
Barcode barcode = null;
......@@ -578,8 +579,8 @@ public class StorageDataController extends BaseController {
}
if(barcode == null){
resultMap.put("result","103");
lineMsg = "条码["+code+"]无效";
resultMap.put("msg",lineMsg);
errorMsg = "条码["+code+"]无效";
resultMap.put("msg",errorMsg);
}else {
StoragePos pos = null;
try {
......@@ -599,32 +600,34 @@ public class StorageDataController extends BaseController {
taskService.addPutInTaskToExecute(theStorage, barcode, pos);
}else{
resultMap.put("result","104");
lineMsg = "未找到可用的仓位";
resultMap.put("msg",lineMsg);
errorMsg = "未找到可用的仓位";
resultMap.put("msg",errorMsg);
}
} catch (ValidateException e) {
lineMsg = e.getMessage();
log.info("查找空库位失败:" + lineMsg);
errorMsg = e.getMessage();
log.info("查找空库位失败:" + errorMsg);
resultMap.put("result","105");
resultMap.put("msg",lineMsg);
resultMap.put("msg",errorMsg);
}
}
}
}
if(!lineMsg.isEmpty()){
//没入成功
if(!errorMsg.isEmpty()){
//有错误,记录日志
AlarmInfo alarmInfo = new AlarmInfo();
alarmInfo.setBoxId("0");
alarmInfo.setStorageName("流水线");
alarmInfo.setInOutStatus("1");
alarmInfo.setAlarmType("入库失败");
alarmInfo.setAlarmType("入库");
Date date = new Date();
alarmInfo.setStartTime(date);
alarmInfo.setEndTime(date);
String msg = "["+code+"]"+lineMsg;
alarmInfo.setAlarmMsg(msg);
alarmInfoDao.save(alarmInfo);
lineMsg = errorMsg;
}else{
lineMsg = okMsg;
}
......@@ -684,7 +687,7 @@ public class StorageDataController extends BaseController {
for (String cid : cidList) {
Storage storage = dataCache.getStorage(cid);
if(storage == null){
return null;
continue;
}
String storageId = storage.getId();
List<PlateSizeBean> usage = storagePosManager.getStoragePosUsage(storageId);
......
......@@ -860,7 +860,7 @@ public class TaskService implements ITaskService {
//log.error("cid["+cid + "]box["+boxId+"]已有入库任务,不可再分配出库任务");
return null;
}else if(task.needReSendToClient()){//超过30秒仍未完成的出库再次发送到客户端
log.error("cid["+cid + "]的出库任务["+ task.getPosName()+"]超过30秒仍未完成,重新发送到客户端!");
log.error("cid["+cid + "]的出库任务["+ task.getPosName()+"]超过60秒仍未完成,重新发送到客户端!");
task.setUpdateDate(new Date());
return task;
}
......
......@@ -9,7 +9,7 @@
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5level [%file:%line] - %msg%n"/>
</Console>
<RollingFile name="log" fileName="${LOG_HOME}/${LOG_NAME}" filePattern="${LOG_HOME}/${LOG_NAME}.%d{yyyy-MM-dd}" append="true">
<PatternLayout charset="GB18030" pattern="%d{yyyy-MM-dd HH:mm:ss} %-5level [%file:%line] - %msg%n" />
<PatternLayout charset="GB18030" pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%file:%line] - %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy modulate="true" interval="1" />
</Policies>
......
......@@ -165,7 +165,7 @@
<%--</display:column>--%>
<%--<display:column titleKey="dataLog.batch" sortable="true" sortProperty="batchInfo" property="batchInfo"/>--%>
<%--<display:column property="operator" titleKey="dataLog.operator" sortable="true" sortProperty="operator"/>--%>
<display:column titleKey="dataLog.date" sortable="true" sortProperty="createDate">
<display:column titleKey="dataLog.date" sortable="true" sortProperty="updateDate">
<fmt:formatDate value="${dataLog.createDate}" pattern="yyyy-MM-dd HH:mm"/>
</display:column>
......@@ -201,7 +201,7 @@
rtl: Metronic.isRTL(),
orientation: "left",
autoclose: true,
language:'zh-CN'
//language:'zh-CN'
});
});
......
......@@ -40,6 +40,7 @@
<tr role="row">
<th></th>
<th><fmt:message key="挚锦"/> (${fn:length(boxReels)})</th>
<th><fmt:message key="值不同"/>(${fn:length(sameDiffList)})</th>
<th><fmt:message key="佳世达"/>(${fn:length(qisdaReels)})</th>
<%--<th><fmt:message key="Facility"/></th>--%>
<%--<th><fmt:message key="Company"/></th>--%>
......@@ -52,20 +53,33 @@
</thead>
<tbody class="dataTableBody">
<c:set var="i" value="0"/>
<c:forEach items="${boxReels}" var="reel">
<c:forEach items="${sameDiffList}" var="diffInfo">
<c:set var="i" value="${i+1}"/>
<tr>
<td>${i}</td>
<td><a href="${ctx}/component/storagePosFind.html?barcode=${reel}" target="_blank">${reel}</a></td>
<td></td>
<td><a href="${ctx}/component/storagePosFind.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId} (${diffInfo.diffDetails})</a></td>
<td></td>
</tr>
</c:forEach>
<c:forEach items="${qisdaReels}" var="qisdareel">
<c:forEach items="${boxReels}" var="diffInfo">
<c:set var="i" value="${i+1}"/>
<tr>
<td>${i}</td>
<td><a href="${ctx}/component/storagePosFind.html?barcode=${diffInfo.reelId}" target="_blank">${diffInfo.reelId}</a></td>
<td></td>
<td></td>
</tr>
</c:forEach>
<c:forEach items="${qisdaReels}" var="diffInfo">
<c:set var="i" value="${i+1}"/>
<tr>
<td>${i}</td>
<td></td>
<td></td>
<td>${qisdareel}</td>
<td>${diffInfo.reelId}</td>
</tr>
</c:forEach>
</tbody>
......
......@@ -761,16 +761,13 @@
}
//刷新库存情况
function flushUsageItem(){
$.post("${ctx}/service/store/listStorageUseage", {}, function (dataMap) {
var maxItemCount = 0;
$.post("${ctx}/service/store/listStorageUseage", {cids:"${cids}"}, function (dataMap) {
for(var cid in dataMap){
var data = dataMap[cid];
var itemCount = 0;
var sizeData = {};
for(var i in data){
itemCount = itemCount + 1;
var itemData = data[i];
var sizeItem = sizeData[itemData.sizeStr];
if(!sizeItem){
......@@ -787,9 +784,6 @@
}
sizeData[itemData.sizeStr] = sizeItem;
}
if(itemCount > maxItemCount){
maxItemCount = itemCount;
}
var sizeList = new Array();
for(var sizeStr in sizeData){
......@@ -800,16 +794,14 @@
sizeList.sort(function(a,b){
var w1 = a.w,w2 = b.w;
if(w1 === w2){
return b.h - a.h;
return a.h - b.h;
}
return w1 - w2;
});
var totalCount = 0;
for(var i in sizeList){
var sizeItem = sizeList[i];
var sizeStr = sizeItem.w + "x" + sizeItem.h;
totalCount = totalCount + sizeItem["usedCount"] + sizeItem["idleCount"];
var html = getItemBar(sizeItem["w"],sizeItem["h"],sizeItem["usedCount"],sizeItem["idleCount"]);
var sizeDom = $("#"+cid+" ."+sizeStr);
......@@ -821,7 +813,23 @@
}
}
$(".task-content").attr("style","height:"+maxItemCount*34+"px;");
var allContent = $(".task-content");
allContent.each(function(index){
if(index % 2 == 1){
var height = $(this).attr("style");
if(height){
return;
}
var itemCount = $(this).children(".itembox").size();
var lastContent = allContent.eq(index -1);
var lastItemCount = lastContent.children(".itembox").size();
if(itemCount < lastItemCount){
itemCount = lastItemCount;
}
$(this).attr("style","height:"+itemCount*34+"px;");
lastContent.attr("style","height:"+itemCount*34+"px;");
}
});
});
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!